Saves the contents of the document to a file or file package located by a URL, formatted to a specified type, for a particular kind of save operation, and returns YES
if successful.
Deprecated
Use save
instead.
SDK
- macOS 10.4–10.6Deprecated
Framework
- App
Kit
Declaration
- (BOOL)saveToURL:(NSURL *)url ofType:(NSString *)typeName forSaveOperation:(NSSave Operation Type)saveOperation error:(NSError * _Nullable *)outError;
Parameters
absoluteURL
The location of the file or file package to which the document contents are saved.
typeName
The string that identifies the document type.
saveOperation
The type of save operation.
outError
On return, if the document contents could not be saved, a pointer to an error object that encapsulates the reason they could not be saved.
Return Value
YES
if the document contents were successfully saved; otherwise, NO
.
Discussion
You can override this method to do things that need to be done before or after any save operation. If you override this method, you must call super
at some point in your implementation.