You can get the path to the Resources
directory like this,
NSString * resourcePath = [[NSBundle mainBundle] resourcePath];
Then append the Documents
to the path,
NSString * documentsPath = [resourcePath stringByAppendingPathComponent:@"Documents"];
Then you can use any of the directory listing APIs of NSFileManager
.
NSError * error;
NSArray * directoryContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:documentsPath error:&error];
Note : When adding source folder into the bundle make sure you select "Create folder references for any added folders option when copying"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…