Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aliabbas90/7d98fc3759b162d4f4af6c5b1630a7a5 to your computer and use it in GitHub Desktop.
Save aliabbas90/7d98fc3759b162d4f4af6c5b1630a7a5 to your computer and use it in GitHub Desktop.
let fm = FileManager.default
let path = Bundle.main.resourcePath!
do {
let items = try fm.contentsOfDirectory(atPath: path)
for item in items {
print("Found \(item)")
}
} catch {
// failed to read directory – bad permissions, perhaps?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment