I get documents path by creat
func docPath() -> String {
let documentPaths = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true)
return documentPaths[0]
}
Now, I would like to get a file path, that file is located under document path. I tried:
let documentPath = docPath()
let filePath = documentPath.stringByAppendingPathComponent("myFile")
But I get error: Value of type 'String' has no member 'stringByAppendingPathComponent'
Why?