The NSFileWrapper class provides access to the attributes and contents of file-system nodes.
A file-system node is a file, directory, or symbolic link. Instances of this class are known as file wrappers.
File wrappers represent a file-system node as an object that can be displayed as an image (and possibly edited in place), saved to the file system, or transmitted to another application.
There are three types of file wrappers:
Regular-file file wrapper: Represents a regular file.
Directory file wrapper: Represents a directory.
Symbolic-link file wrapper: Represents a symbolic link.
A file wrapper has these attributes:
Filename. Name of the file-system node the file wrapper represents.
file-system attributes. See NSFileManager Class Reference for information on the contents of the attributes dictionary.
Regular-file contents. Applicable only to regular-file file wrappers.
File wrappers. Applicable only to directory file wrappers.
Destination node. Applicable only to symbolic-link file wrappers.
If reading with this option succeeds, then subsequent uses of fileWrappers, regularFileContents, symbolicLinkDestinationURL, and serializedRepresentation sent to the file wrapper and all its child file wrappers will fail and return nil only if an actual error occurs (for example, the volume has disappeared or the file server is unreachable)—not as a result of the user moving or deleting files.
more