---
title: NSData.ReadingOptions
framework: foundation
role: symbol
role_heading: Structure
path: foundation/nsdata/readingoptions
---

# NSData.ReadingOptions

Options for methods used to read data objects.

## Declaration

```swift
struct ReadingOptions
```

## Topics

### Initializers

- [init(rawValue:)](foundation/nsdata/readingoptions/init(rawvalue:).md)

### Constants

- [mappedIfSafe](foundation/nsdata/readingoptions/mappedifsafe.md)
- [uncached](foundation/nsdata/readingoptions/uncached.md)
- [alwaysMapped](foundation/nsdata/readingoptions/alwaysmapped.md)

### Legacy Constants

- [dataReadingMapped](foundation/nsdata/readingoptions/datareadingmapped.md)
- [mappedRead](foundation/nsdata/readingoptions/mappedread.md)
- [uncachedRead](foundation/nsdata/readingoptions/uncachedread.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Reading Data from a File

- [init(contentsOfFile:)](foundation/nsdata/init(contentsoffile:).md)
- [init(contentsOfFile:options:)](foundation/nsdata/init(contentsoffile:options:).md)
- [init(contentsOfMappedFile:)](foundation/nsdata/init(contentsofmappedfile:).md)
- [dataWithContentsOfMappedFile(_:)](foundation/nsdata/datawithcontentsofmappedfile(_:).md)
