Closed EthanSK closed 6 years ago
Perhaps something like this will help you:
// Create a FileManager instance
let fileManager = NSFileManager.defaultManager()
// Get contents in directory: '.' (current one)
do {
let files = try fileManager.contentsOfDirectoryAtPath(".")
print(files)
}
catch let error as NSError {
print("Ooops! Something went wrong: \(error)")
}
Copied from https://iswift.org/cookbook/get-directory-contents
I can't seem to figure out how to get a dictionary of [String: UIImage] from a folder. I would assume this is a basic necessity, as you would need to be able to determine what images you actually saved!
Can someone tell me how to do this if I am missing it, or if it doesn't exist - can this be a feature request!