Reputation: 1
Users can upload images (jpg or png) from computer to iPhone, and images will be stored in app document folder.
My questions are
how to check the names of images that are currently in document folder?
how to identify it is a jpg or png?
Thanks in advance!:)
Upvotes: 0
Views: 515
Reputation: 33058
The files uploaded via iTunes can be found in the app's document folder:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
// Get documents folder
NSString *documentsDirectory = [paths objectAtIndex:0];
In there, get the files and check the extension to find out if it is JPG, PNG or whatever.
Upvotes: 1