Contents

saveToURL:ofType:forSaveOperation:error:

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.

Declaration

- (BOOL) saveToURL:(NSURL *) url ofType:(NSString *) typeName forSaveOperation:(NSSaveOperationType) saveOperation error:(NSError **) outError;

Parameters

  • url:

    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

true if the document contents were successfully saved; otherwise, false.

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.

See Also

Methods