Enumeration

NSDataWritingOptions

Options for methods used to write data objects.

Declaration

typedef enum NSDataWritingOptions : NSUInteger {
    ...
} NSDataWritingOptions;

Topics

Constants

NSDataWritingAtomic

A hint to write data to an auxiliary file first and then exchange the files.

NSDataWritingWithoutOverwriting

A hint to return prevent overwriting an existing file.

NSDataWritingFileProtectionNone

A hint to set the content protection attribute of the file when writing it out.

NSDataWritingFileProtectionComplete

A hint to set the content protection attribute of the file when writing it out.

NSDataWritingFileProtectionCompleteUnlessOpen

A hint to set the content protection attribute of the file when writing it out.

NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication

A hint to set the content protection attribute of the file when writing it out.

NSDataWritingFileProtectionMask

A mask to use when determining the file protection options assigned to the data.

Legacy Constants

NSAtomicWrite

A hint to write data to an auxiliary file first and then exchange the files.

Entitlements

Data Protection Entitlement

The level of data protection that encrypts sensitive user data when accessed on some devices.

Key: com.apple.developer.default-data-protection

See Also

Writing Data to a File

- writeToFile:atomically:

Writes the data object's bytes to the file specified by a given path.

- writeToFile:options:error:

Writes the data object's bytes to the file specified by a given path.

- writeToURL:atomically:

Writes the data object's bytes to the location specified by a given URL.

- writeToURL:options:error:

Writes the data object's bytes to the location specified by a given URL.