leithdm
3/7/2016 - 9:35 AM

URL for a file in Documents directory

URL for a file in Documents directory

let filename = "foo.bar"
let dirPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as String
let pathArray = [dirPath, filename]
let fileURL =  NSURL.fileURLWithPathComponents(pathArray)!