Instance Property


The filename of the file wrapper object


@property(copy) NSString *filename;


This property contains the file wrapper’s filename, or nil when the file wrapper has no corresponding file-system node.

The filename is used for record-keeping purposes only and is set automatically when the file wrapper is created from the file system using initWithURL:options:error: and when it’s saved to the file system using writeToURL:options:originalContentsURL:error: (although this method allows you to request that the filename not be updated).

The filename is usually the same as the preferred filename, but might instead be a name derived from the preferred filename. You can use this method to get the name of a child that's just been read. Don’t use this method to get the name of a child that's about to be written, because the name might be about to change; send keyForFileWrapper: to the parent instead.

See Also

Accessing Files


The preferred filename for the file wrapper object.


A dictionary of file attributes.


The contents of the file-system node associated with a regular-file file wrapper.