Skip to content

Instantly share code, notes, and snippets.

@andrewwoz
Last active October 15, 2019 06:07
Show Gist options
  • Save andrewwoz/70b04e726ba1a3f0d59d73d45fca7bfe to your computer and use it in GitHub Desktop.
Save andrewwoz/70b04e726ba1a3f0d59d73d45fca7bfe to your computer and use it in GitHub Desktop.
[Create directory in swift] #fs
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