Reputation: 469
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?
Upvotes: 3
Views: 1186
Reputation: 2800
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
Upvotes: 5