问题
I'm going to develop a simple app for jailbroken iOS devices. I would like to access the filesystem of the device outside of the app's sandbox and move some files (from a directory to another, for example).
How can I do this using Xcode 3.1 or 4, compatible with OS version 3.1.3?
回答1:
Just use NSFileManager. On a jailbroken device, it gives you full access to the filesystem—just give it the paths you want to mess with. You can get the contents of a directory with its -contentsOfDirectoryAtPath:error:
method and move files around with -moveItemAtPath:toPath:error:
.
来源:https://stackoverflow.com/questions/7095421/how-do-i-access-the-filesystem-outside-of-the-sandbox-on-a-jailbroken-ios-device