---
title: fileType
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/documentattributekey/filetype
---

# fileType

The document type for interpreting the document.

## Declaration

```swift
static let fileType: NSAttributedString.DocumentAttributeKey
```

## Discussion

Discussion The value of this attribute is an NSString object indicating which document type was used to interpret the document, specified as a UTI; for reading, this is available along with documentType, but for writing the two are mutually exclusive.

## See Also

### Getting document type keys

- [documentType](foundation/nsattributedstring/documentattributekey/documenttype.md)
- [textEncodingName](foundation/nsattributedstring/documentattributekey/textencodingname.md)
