Contents

initWithContentsOfFile:ofType:

Initializes and returns a document object.

Declaration

- (id) initWithContentsOfFile:(NSString *) absolutePath ofType:(NSString *) typeName;

Discussion

Initializes and returns an NSDocument object of document type docType containing data stored in the file fileName. In opening the file, invokes the readFromFile:ofType: method. If the document successfully opens the file, it updates fileURL and fileType. If the file cannot be opened, or the document is unable to load the contents of the file, this method returns nil. This initializer is typically invoked by the NSDocumentController method makeDocumentWithContentsOfFile:ofType:.

See Also

Methods