---
title: "fileAttributesToWriteToFile:ofType:saveOperation:"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdocument/fileattributestowritetofile:oftype:saveoperation:"
---

# fileAttributesToWriteToFile:ofType:saveOperation:

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

## Declaration

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

## Discussion

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.

## See Also

### Methods

- [dataRepresentationOfType:](appkit/nsdocument/datarepresentationoftype:.md)
- [fileName](appkit/nsdocument/filename.md)
- [fileWrapperRepresentationOfType:](appkit/nsdocument/filewrapperrepresentationoftype:.md)
- [initWithContentsOfFile:ofType:](appkit/nsdocument/initwithcontentsoffile:oftype:.md)
- [initWithContentsOfURL:ofType:](appkit/nsdocument/initwithcontentsofurl:oftype:.md)
- [loadDataRepresentation:ofType:](appkit/nsdocument/loaddatarepresentation:oftype:.md)
- [loadFileWrapperRepresentation:ofType:](appkit/nsdocument/loadfilewrapperrepresentation:oftype:.md)
- [printShowingPrintPanel:](appkit/nsdocument/printshowingprintpanel:.md)
- [readFromFile:ofType:](appkit/nsdocument/readfromfile:oftype:.md)
- [readFromURL:ofType:](appkit/nsdocument/readfromurl:oftype:.md)
- [revertToSavedFromFile:ofType:](appkit/nsdocument/reverttosavedfromfile:oftype:.md)
- [revertToSavedFromURL:ofType:](appkit/nsdocument/reverttosavedfromurl:oftype:.md)
- [runModalPageLayoutWithPrintInfo:](appkit/nsdocument/runmodalpagelayoutwithprintinfo:.md)
- [saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:](appkit/nsdocument/savetofile:saveoperation:delegate:didsaveselector:contextinfo:.md)
- [saveToURL:ofType:forSaveOperation:error:](appkit/nsdocument/savetourl:oftype:forsaveoperation:error:.md)
