Initializer

init(contentsOfMappedFile:)

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

Declaration

init?(contentsOfMappedFile path: String)

Parameters

path

The absolute path of the file from which to read data.

Return Value

A data object initialized by reading into it the mapped file specified by path.

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.

struct NSData.ReadingOptions

Options for methods used to read data objects.

class func dataWithContentsOfMappedFile(String) -> Any?

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

Deprecated

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software