let singleImage = "current.jpg"
let path = NSURL(fileURLWithPath: NSTemporaryDirectory()).URLByAppendingPathComponent(singleImage)
let fileManager = NSFileManager.defaultManager()
fileManager.createFileAtPath(path, contents: imageDataFromURL, attributes: [:])
createFileAtPath
stopped working after upgrade to Swift 2 and now it gives the following error:
Cannot convert value of type 'NSURL' to expected argument type 'String'