How to get the list of files in Resource folder in Objective-c(iOS)?

0 votes
243 views
asked Sep 26, 2013 by jonathan (3,105 points)
HI All

  How to get the list of files in Resource folder in Objective-c(iOS)?

1 Answer

0 votes
answered Sep 26, 2013 by admin (8,135 points)

 

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSError * error;
    NSArray * directoryContents = [[[NSArray alloc] init]autorelease];

    directoryContents =  [[NSFileManager defaultManager] 
                          contentsOfDirectoryAtPath:documentsDirectory error:&error];

    NSLog(@"directoryContents ====== %@",directoryContents);
...