Let’s say I have a folder in my “Resources” folder of my iPhone application called “Documents”.
Is there a way that I can get an array or some type of list of all the files included in that folder at run time?
So, in code, it would look like:
NSMutableArray *myFiles = [...get a list of files in Resources/Documents...];
Is this possible?
You can get the path to the
Resourcesdirectory like this,Then append the
Documentsto the path,Then you can use any of the directory listing APIs of
NSFileManager.Note : When adding source folder into the bundle make sure you select “Create folder references for any added folders option when copying”