Contents

init(regularFileWithContents:)

Initializes the receiver as a regular-file file wrapper.

Declaration

init(regularFileWithContents contents: Data)

Parameters

  • contents:

    Contents of the file.

Return Value

Initialized regular-file file wrapper containing contents.

Discussion

After initialization, the file wrapper is not associated with a file-system node until you save it using write(to:options:originalContentsURL:).

The file wrapper is initialized with open permissions: anyone can write to or read the file wrapper.

See Also

Related Documentation

Creating File Wrappers