Skip to content

Instantly share code, notes, and snippets.

@lonelytango
Created August 7, 2014 17:46
Show Gist options
  • Save lonelytango/65b9e8520d52ea743c1d to your computer and use it in GitHub Desktop.
Save lonelytango/65b9e8520d52ea743c1d to your computer and use it in GitHub Desktop.
Local document URL with provided file name
func localURL(filename: String) -> NSURL {
let urls = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)
let url = urls[urls.count-1] as NSURL
return url.URLByAppendingPathComponent(filename)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment