Writes document data to a file.
- macOS 10.0–10.4Deprecated
Writes document data of type
doc to the file
file, returning whether the operation was successful. This method invokes
data and is indirectly invoked whenever the document file is saved. It uses the
write to write to the file.
This method is one of the location-based primitives. Subclasses can override this method instead of overriding
data to write document data to the file system as an
NSData object after creating that object from internal data structures. Subclasses that handle file packages such as RTFD or that treat locations of files as anything other than paths should override this method. Override implementations of this method should ensure that they filter document data appropriately using
NSPasteboard filtering services.
See Document Saving Behavior for additional information about saving documents.