Structure

NSData.ReadingOptions

Options for methods used to read data objects.

Topics

Constants

static var mappedIfSafe: NSData.ReadingOptions

A hint indicating the file should be mapped into virtual memory, if possible and safe.

static var uncached: NSData.ReadingOptions

A hint indicating the file should not be stored in the file-system caches.

static var alwaysMapped: NSData.ReadingOptions

Hint to map the file in if possible.

Relationships

Conforms To

See Also

Reading Data from a File

init?(contentsOfFile: String)

Initializes a data object with the content of the file at a given path.

init(contentsOfFile: String, options: NSData.ReadingOptions = [])

Initializes a data object with the content of the file at a given path.

init?(contentsOf: URL)

Initializes a data object with the data from the location specified by a given URL.

init(contentsOf: URL, options: NSData.ReadingOptions = [])

Initializes a data object with the data from the location specified by a given URL.

init?(contentsOfMappedFile: String)

Initializes a data object with the contents of the mapped file specified by a given path.

Deprecated
class func dataWithContentsOfMappedFile(String)

Creates and returns a data object from the mapped file at a given path.

Deprecated