Instance Property

regularFileContents

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

Declaration

var regularFileContents: Data? { get }

Discussion

This property may contain nil if the user modifies the file after you call read(from:options:) or init(url:options:) but before NSFileWrapper has read the contents of the file. Use the NSFileWrapperReadingImmediate 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.