iOS does not allow access to app sandbox for other apps (IOS8 is already open for access)
There are usually several file directories in the sandbox:
{
1. Application Package: Contains all the resource files and executable files
2. Documents: Saves data that needs to be persisted when the app runs, and itunes automatically backs up the directory. Apple recommends that the file data that is created in the program or browsed in the program be stored in that directory, which is included in itunes Backup and restore.
3. tmp: Save the temporary data required to run the application, and then delete the corresponding files from the directory when the application is not running, the system may also clear files in the directory, itunes will not sync the directory. When the iphone restarts, the files in that directory are lost.
4. Library: Store program default settings and other status information, itunes will automatically back up the directory
4.1, Library/caches: Store cache files, itunes will not back up this directory, the files in this directory will not be removed in the application, general storage mentioned larger, not particularly important resources
4.2. Library/preferences: Save all your app's preferences, and iOS's setting app will find the app's settings in that directory, and itunes will automatically back it up.
}
Home Directory
NSString *homedirectory = Nshomedirectory ();
Document Directory
Nsarray *paths = Nssearchpathfordirectoriesindomains (Nsdocumentdirectory,nsuserdomainmask,yes);
NSString *path = [Paths objectatindex:0];
Cache Directory
Nsarray *paths = Nssearchpathfordirectoriesindomains (Nscachesdirectory,nsuserdomainmask,yes);
NSString *path = [Paths objectatindex:0];
Library Directory
NSString *paths = Nssearchpathfordirectoriesindomains (Nslibrarydirectory,nsuserdomainmask,yes);
NSString *path = [Paths objectatindex:0];
TMP directory
NSString *tmpdir = Nstemporarydirectory ();
iOS app sandbox: File system directory.