In an iOS system, each app's files are independent, and the file system most processed by an app is limited to the app's sandbox folder. When the new app is installed, a series of file directories are generated, as shown in:
Let's take a look at this separately:
Appname.app: Resources that contain apps and responses, etc.
Documents: Store user generated data, the data in this folder can be manipulated by the user, can be itune backup.
Documents/inbox: If the app allows other apps to open, put the files that other apps can use in this file.
Library: There are a few folders, cache: storage caches, Preference: Store Some configuration information, Nsuserdefault information is placed in this folder. The files in this file are data that is not allowed to be manipulated directly by the user.
TMP: temporary folder, save some temporary information, the program will be cleared when exiting
How to get this file path:
//Get the program home directorynshomedirectory ();//Get the program directoryNsarray *paths =nssearchpathfordirectoriesindomains (Nsapplicationdirectory, Nsuserdomainmask, YES);//Document DirectoryNsarray *paths =nssearchpathfordirectoriesindomains (NSDocumentDirectory, Nsuserdomainmask, YES); NSString*documentpath = [Paths Objectatindex:0];//Library DirectoryNSString *librarypath = [Nssearchpathfordirectoriesindomains (nslibrarydirectory, Nsuserdomainmask, YES) Objectatindex:0];//Preference DirectoryNSString *preferencepath = [LibraryPath stringbyappendingformat:@"/preference"]; //Cache DirectoryNSString *cachepath = [LibraryPath stringbyappendingformat:@"/caches"]; //tmp directoryNSString * Tmppath = [Nshomedirectory () Stringbyappendingformat:@"/ tmp"];
iOS file system