<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextAttachment/fileWrapper",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextAttachment(py)fileWrapper"
  },
  "title" : "fileWrapper"
}
-->

# fileWrapper

The text attachment’s file wrapper.

```
var fileWrapper: FileWrapper? { get set }
```

## Discussion

The file wrapper holds the contents of the attached file. In iOS, modifying this property has a side effect of invalidating the [`image`](/documentation/AppKit/NSTextAttachment/image), [`contents`](/documentation/AppKit/NSTextAttachment/contents), and [`fileType`](/documentation/AppKit/NSTextAttachment/fileType) properties.

---

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)