---
title: "readingIntent(with:options:)"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/nsfileaccessintent/readingintent(with:options:)"
---

# readingIntent(with:options:)

Returns a file access intent object for reading the given URL with the provided options.

## Declaration

```swift
class func readingIntent(with url: URL, options: NSFileCoordinator.ReadingOptions = []) -> Self
```

## Parameters

- `url`: The URL of the document you intend to read from.
- `options`: The coordinated reading options. For a list of valid values, see doc://com.apple.foundation/documentation/Foundation/NSFileCoordinator/ReadingOptions in the doc://com.apple.foundation/documentation/Foundation/NSFileCoordinator.

## Return Value

Return Value A newly instantiated and configured file access intent object.

## Discussion

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.

## See Also

### Related Documentation

- [coordinate(with:queue:byAccessor:)](foundation/nsfilecoordinator/coordinate(with:queue:byaccessor:).md)

### Creating a File Access Intent

- [writingIntent(with:options:)](foundation/nsfileaccessintent/writingintent(with:options:).md)
