Skip to content

Instantly share code, notes, and snippets.

@cecilemuller
Last active June 29, 2022 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cecilemuller/f16baed952c1a728130a25a09dc33b57 to your computer and use it in GitHub Desktop.
Save cecilemuller/f16baed952c1a728130a25a09dc33b57 to your computer and use it in GitHub Desktop.
Swift: get document directory
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