Instance Property


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


var regularFileContents: Data? { get }


This property may contain nil if the user modifies the file after you call read(from:options:) or init(url:options:) but before FileWrapper has read the contents of the file. Use the immediate reading option to reduce the likelihood of that problem.

Special Considerations

This property raises NSInternalInconsistencyException if the file wrapper object is not a regular-file file wrapper.

See Also

Accessing Files

var filename: String?

The filename of the file wrapper object

var preferredFilename: String?

The preferred filename for the file wrapper object.

var fileAttributes: [String : Any]

A dictionary of file attributes.