Get Documents directory path in Swift


/ Published in: Other
Save to your folder(s)

Get Documents directory path in Swift


Copy this code and paste it in your HTML
  1. func getDocsDir() -> String {
  2. let dirPaths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)
  3. let docsDir = dirPaths[0] as! String
  4. return docsDir
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.