I am able to list the content inside Document Directory
in Table view
. But i have 50 folders that i have downloaded from various sources in document directory. Now i want fetch all the 50 folders content along with document directory content...
//This is my Code...
NSArray * paths = NSSearchPathForDirectoriesInDomains ( NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSError * error;
NSArray *extensions = [NSArray arrayWithObjects:@"mp4", @"folder", @"mov", @"m4v", @"pdf", @"doc", @"xls", @"mp3" ,nil];
directoryContents = [[NSFileManager defaultManager]
contentsOfDirectoryAtPath:documentsDirectory error:&error];
directoryContents = [directoryContents filteredArrayUsingPredicate:
[NSPredicate predicateWithFormat:@"pathExtension IN %@", extensions ]];
NSLog(@"directoryContents ====== %@",directoryContents);