Created
May 20, 2018 14:10
-
-
Save mediter/3806df442d51f8692689e8d4de0e60bb to your computer and use it in GitHub Desktop.
[App Document Directory] #swift #persistence
This file contains 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
// MARK: - Data Persistence | |
func documentsDirectory() -> URL { | |
let paths = FileManager.default.urls(for: .documentDirectory, | |
in: .userDomainMask) | |
return paths[0] | |
} | |
func dataFilePath() -> URL { | |
return documentsDirectory().appendingPathComponent("Checklists.plist") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment