writeToFile:ofType:originalFile:saveOperation:
Writes the receiver document’s contents to a file.
Declaration
- (BOOL) writeToFile:(NSString *) fullDocumentPath ofType:(NSString *) documentTypeName originalFile:(NSString *) fullOriginalDocumentPath saveOperation:(NSSaveOperationType) saveOperationType;Discussion
This method is called from writeWithBackupToFile:ofType:saveOperation: to actually write the file of type docType to fullDocumentPath. fullOriginalDocumentPath is the path to the original file if there is one and nil otherwise. The default implementation simply calls writeToFile:ofType:. You should not need to call this method directly, but subclasses that need access to the previously saved copy of their document while saving the new one can override this method. The saveOperationType argument is one of the constants listed in Constants.
See Document Saving Behavior for additional information about saving documents.
See Also
Methods
dataRepresentationOfType:fileAttributesToWriteToFile:ofType:saveOperation:fileNamefileWrapperRepresentationOfType:initWithContentsOfFile:ofType:initWithContentsOfURL:ofType:loadDataRepresentation:ofType:loadFileWrapperRepresentation:ofType:printShowingPrintPanel:readFromFile:ofType:readFromURL:ofType:revertToSavedFromFile:ofType:revertToSavedFromURL:ofType:runModalPageLayoutWithPrintInfo:saveToFile:saveOperation:delegate:didSaveSelector:contextInfo: