Initializer

init(contentsOfFile:)

Returns a data object initialized by reading into it the data from the file specified by a given path.

Declaration

init?(contentsOfFile 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 data from the file specified by path. The returned object might be different than the original receiver.

Discussion

This method is equivalent to init(contentsOfFile:options:) with no options.