
Untitled
By: a guest on
Jun 13th, 2012 | syntax:
None | size: 0.89 KB | hits: 18 | expires: Never
NSFileManager unable to view below certain directories
NSString *path = @"/private/var/mobile/Applications/";
NSFileManager *manager = [NSFileManager defaultManager];
NSArray *fileList = [manager contentsOfDirectoryAtPath:path error:nil];
for(NSString *file in fileList) {
NSString *fullpath = [path stringByAppendingPathComponent:file];
NSLog(@"fullpath = %@", fullpath);
BOOL isDir = nil;
[manager fileExistsAtPath:fullpath isDirectory:(&isDir)];
if(isDir) {
NSLog(@"isDir");
//NSArray *subfiles = [self filesBeneathDirectory:fullpath withExtension:extension];
} else {
NSLog(@"!isDir");
NSDictionary *attributes = [manager attributesOfItemAtPath:fullpath error:nil];
NSLog(@"attributes = %@",attributes);
}
}