Skip to content

Instantly share code, notes, and snippets.

@andrewwoz
Last active October 15, 2019 06:05
Show Gist options
  • Select an option

  • Save andrewwoz/48411559334b46895f2e493da9125440 to your computer and use it in GitHub Desktop.

Select an option

Save andrewwoz/48411559334b46895f2e493da9125440 to your computer and use it in GitHub Desktop.
[Perform deep enumeration of directory] #fs
// Performs a deep enumeration of the specified directory and returns the paths of all of the contained subdirectories.
guard let documents = try? fs.url(for: .documentDirectory,
in: .userDomainMask,
appropriateFor: nil,
create: false) else { return }
let subpaths = try! fs.subpathsOfDirectory(atPath: documents.path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment