Note:
A: nsfilehandle can only open existing files, so if it is a new file, nsfilemanager needs to create a new file first;
B: After opening a file, you need to close it;
C: You may need to set different offsets (that is, the position of the cursor) according to different requirements. You can move them to the beginning or end by moving them to the end, you can also obtain the current location and then increase or decrease the number of bytes to move;
D: the file path is an nsstring object. You can useStringbyappendingpathcomponent + full name of the fileMethod to Construct a complete file path;
E: The content written to the file is nsdata. If it is in another format, you can useDatausingencoding:Nsutf8stringencodingTo convert to the data type;
F: Similarly, the directory is written in a similar way in Linux ,~ Home Directory,/root directory,. Current Directory,. parent directory, and/indicating level.
(1) nsfilemanager (see http://blog.csdn.net/enuola/article/details/7797055)
(2) nsfilemanager (see http://www.cnblogs.com/jiangyuxuan/archive/2013/03/09/2950988.html)
[OC learning-23] considerations and common operations for nsfilemanager and nsfilehandle