James Schneider James Schneider - 1 year ago 52
Swift Question

Listing files in a specific folder

I've created a folder called "Photos" in the Documents folder.

Using Swift code, I want to print the names of the files in the Photos folder.

Answer Source
do {
    let files = try NSFileManager.defaultManager().contentsOfDirectoryAtPath("/Users/username/Documents/Photos")
} catch {