In iOS development, create a sandbox in a sandbox some file directories or files that store each feature.
Use:
[Nsfilemanager Defaultmanager]
1. Determine the directory, with which she can.
2. Judge the document, using her can.
3. Create a directory with which she can.
4. Create a file that she can use.
The basic implementation is similar, is to get the directory, files in the sandbox after the path.
1. First determine whether there is:
[[Nsfilemanager Defaultmanager] Fileexistsatpath: directory (file) path]
2. Create her if it doesn't exist:
[[Nsfilemanager Defaultmanager] Createfileatpath: directory (file) path Contents:nil attributes:null];
Attention:
1. Some parameters can be viewed in other materials.
2. In the creation of the file, the premise is that the path to save the file exists!! Haha, there is no path, how do you save ah Big Brother.
3. There are, of course, many other ways, yes.
iOS sandbox, how to determine the existence of files, directories