is it possible to see content of Documents folder on iphone from debugger console
I want to see the content of Documents folder from console, I can see开发者_运维百科 for simulator but it's not working for device
my path is /var/mobile/Applications/3E79C7B3-2639-477F-B355-1A3C70D4ECBE/Documents but how to check this?
You can get the location of the Documents directory like so:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
path = [paths objectAtIndex:0];
And then simply print the contents of the directory to the console:
NSLog(@"%@", [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil]);
Here's the relevant documentation: http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/LowLevelFileMgmt/Articles/StandardDirectories.html
精彩评论