I’m looking for a way to fill an NSArray with NSStrings that are the names of the directories in the apps documents directory.
This is what I have so far:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
for (//loop until no more directories)
{
NSString *newDir = [documentsDirectory stringByAppendingPathComponent:path];
//Code for retrieving directory names
[directoriesArray addObject:newDir];
}
I’m not sure what the for loop’s conditions need to be and I’m not sure how to retrieve the directories names.
Thanks for the advice in advance.
Try this
So in your case
Hope this helps