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

# fileAttributesToWriteToFile:ofType:saveOperation:

Returns the file attributes that should be written to the named document file of the specified type.

```
- (NSDictionary *) fileAttributesToWriteToFile:(NSString *) fullDocumentPath ofType:(NSString *) documentTypeName saveOperation:(NSSaveOperationType) saveOperationType;
```

## Discussion

Returns the file attributes that should be written to the named document file of the specified type `docType`, as part of a particular `saveOperationType`. The set of valid file attributes is a subset of those understood by the `NSFileManager` class.

---

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)