<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAttributedString/DocumentReadingOptionKey/fileType",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation",
      "AppKit"
    ],
    "preciseIdentifier" : "c:@NSFileTypeDocumentOption"
  },
  "title" : "fileType"
}
-->

# fileType

The file type.

```
static let fileType: NSAttributedString.DocumentReadingOptionKey
```

## Discussion

The value of this attribute is an [`NSString`](/documentation/Foundation/NSString) object indicating a document type to be forced when loading the document, specified as a UTI string; mutually exclusive with [`documentType`](/documentation/Foundation/NSAttributedString/DocumentReadingOptionKey/documentType).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)