Reputation: 3221
I have set of images in iphone document directory,
Eg:
document_directory/sub_directory_1/sub directory_2
So how to retrieve all images from sub directory_2 as a NSArray or some sort of a data structure.
Thank you
Upvotes: 0
Views: 492
Reputation: 35318
Assuming you have the path as a NSString*, use NSFileManager
NSFileManager *fileManager = [NSFileManager defaultManager];
for (NSString *fileName in [fileManager contentsOfDirectoryAtPath:directoryPath error:NULL]) {
NSLog(@"Found file %@", fileName);
}
Upvotes: 3