Created
August 7, 2014 17:46
-
-
Save lonelytango/65b9e8520d52ea743c1d to your computer and use it in GitHub Desktop.
Local document URL with provided file name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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