Last active
June 29, 2022 23:43
-
-
Save cecilemuller/f16baed952c1a728130a25a09dc33b57 to your computer and use it in GitHub Desktop.
Swift: get document directory
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
import Foundation | |
extension FileManager { | |
public static var documentDirectory: URL { | |
return FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment