<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.0.0 - 10.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDocument/fileWrapperRepresentationOfType:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDocument(im)fileWrapperRepresentationOfType:"
  },
  "title" : "fileWrapperRepresentationOfType:"
}
-->

# fileWrapperRepresentationOfType:

Returns a file wrapper object that represents the data of the receiver in a given type.

```
- (NSFileWrapper *) fileWrapperRepresentationOfType:(NSString *) type;
```

## Discussion

Returns an `NSFileWrapper` object that represents the data of the receiver in a given type (`aType`). This method invokes `dataRepresentationOfType:` to get the data object from which to create a plain-file file wrapper. Subclasses can override this method if `dataRepresentationOfType:` is not adequate for their needs. This method is invoked by the default implementation of [`writeToFile:ofType:`](/documentation/AppKit/NSDocument/writeToFile:ofType:).

---

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)