Created
January 22, 2020 08:18
-
-
Save dirtyhenry/ced0aef8a354f80c22e4a8b6ff3e06b2 to your computer and use it in GitHub Desktop.
URL Building
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
let url1 = try! FileManager.default.url(for: .documentDirectory, | |
in: .userDomainMask, | |
appropriateFor: nil, | |
create: false) | |
.appendingPathComponent("1234") | |
let url2 = URL(fileURLWithPath: NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]) | |
.appendingPathComponent("1234") | |
debugPrint("Same URL? \(url1 == url2)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment