Last active
October 15, 2019 06:07
-
-
Save andrewwoz/70b04e726ba1a3f0d59d73d45fca7bfe to your computer and use it in GitHub Desktop.
[Create directory in swift] #fs
This file contains hidden or 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 fs = FileManager.default | |
let baseURL: URL = ... | |
do { | |
try fs.createDirectory( | |
at: baseURL.appendingPathComponent("someDirectory/someSubDirectory"), | |
withIntermediateDirectories: true, attributes: nil) | |
} catch let error { | |
/// handle error | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment