readingIntent(with:options:)
Returns a file access intent object for reading the given URL with the provided options.
Declaration
class func readingIntent(with url: URL, options: NSFileCoordinator.ReadingOptions = []) -> SelfParameters
- url:
The URL of the document you intend to read from.
- options:
The coordinated reading options. For a list of valid values, see Readingoptions in the Nsfilecoordinator.
Return Value
A newly instantiated and configured file access intent object.
Discussion
When calling a file coordinator’s coordinate(with:queue:byAccessor:) method, you pass an array of file access intent objects. Each intent object represents a specific read or write operation on a single document or directory. Use readingIntentWithURL:options: to create an intent object suitable for reading.