Common nsfilemanager operations
-(Bool) contentsatpath: path // read data from the file specified by a path-(bool) createfileatpath: path contents :( nsdata *) data attributes: ATTR // write data-(bool) removefileatpath: path handler: Handler // delete the file specified by a path-(bool) movepath: from topath: to handler: Handler // rename or move an object. From is the source file, to is the target file-(bool) contentsequalatpath: path1 andpath: path2 // compare the content of the two files is the same-(bool) fileexistsatpath: path // determine whether the file specified by path exists-(bool) isreadablefileatpath: path // determine whether the file specified by path exists and whether to perform read operations-(bool) iswritablefileatpath: path // determine whether the file specified by path exists and whether to perform write operations-(nsdictionary *) fileattributesatpath: path traverselink :( bool) Flag // obtain the attributes of the file specified by path, return a dictionary type-(bool) changefileatributes: ATTR atpath: path // change the attributes of the file specified by path nsfi Lemanager directory operation-(nsstring *) currentdirectorypath // get the current directory-(bool) changecurrentdirectorypath: path // change the current directory-(bool) copypath: From topath: to handler: handler // copy the directory structure-(bool) createdirectoryatpath: path attributes: ATTR // create a new directory-(bool) fileexistsatpath: path isdirectory :( bool *) flag // determine if it is a directory-(nsarray *) directorycontentsatpath: path // list directory content-(nsdirectoryenumerator *) enumeratoratpath: path // enumerate directory content-(bool) removefielp Ath: path handler: Handler // delete an empty directory-(bool) movepath: From topath: to handler: Handler // rename or move a directory-(nsstring *) nsusername // return the current user directory-(nsstring *) nsfullusername // return the complete directory of the current user-(nsstring *) nshomedirectory // return the path of the current user's main directory-(nsstring *) nshomedirectoryforuser :( nsstring *) User // return the user's home directory-(nsstring *) nstemporarydirectory // return the temporary directory that can be used to create temporary files + (nsstring *) pathwithcomponents: components // construct a path-(nsarray *) PA based on the value in components Thcomponents // extract the sub-path, obtain each part, and put it into the array-(nsstring *) lastpathcomponents // extract the last part of the channel (generally the file name)-(nsstring *) pathextension // extract the file extension-(nsstring *) stringbyappendingpathcomponents: path // Add the path to the end of the existing path-(nsstirng *) stringbyappendingpathextension: EXT // Add the ext extension to the end-(nsstring *) stringbydeletinglastpathcomponents // Delete the last part of the path-(nsstring *) stringbydeletingpathextension // Delete the last extension-(nsstring *) stringbyexpandingtildein Path // convert each path in the path "~ "Symbol to the user's main directory (~) Or the main directory of a specified user (~ User)-(nsstring *) stringbystandardizingpath // resolution ~, Parent directory (..), current directory (..), and symbolic link to return a canonicalized path