Structure

NSData.WritingOptions

Options for methods used to write data objects.

Declaration

struct WritingOptions

Topics

Constants

static var atomic: NSData.WritingOptions

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

static var withoutOverwriting: NSData.WritingOptions

A hint to return prevent overwriting an existing file.

static var noFileProtection: NSData.WritingOptions

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

static var completeFileProtection: NSData.WritingOptions

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

static var completeFileProtectionUnlessOpen: NSData.WritingOptions

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

static var completeFileProtectionUntilFirstUserAuthentication: NSData.WritingOptions

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

static var fileProtectionMask: NSData.WritingOptions

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

Legacy Constants

static var atomicWrite: NSData.WritingOptions

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

Relationships

Conforms To

See Also

Writing Data to a File

func write(toFile: String, atomically: Bool) -> Bool

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

func write(toFile: String, options: NSData.WritingOptions = [])

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

func write(to: URL, atomically: Bool) -> Bool

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

func write(to: URL, options: NSData.WritingOptions = [])

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