Instance Method

writeRTFDToFile:atomically:

Writes the receiver’s text as RTF with attachments to a file or directory at path.

Declaration

- (BOOL)writeRTFDToFile:(NSString *)path atomically:(BOOL)flag;

Discussion

Returns YES on success and NO on failure. If atomicFlag is YES, attempts to write the file safely so that an existing file at path is not overwritten, nor does a new file at path actually get created, unless the write is successful.

See Also

Reading and writing RTF files

- readRTFDFromFile:

Attempts to read the RTFD file at path, returning YES if successful and NO if not.

- RTFDFromRange:

Returns an NSData object that contains an RTFD stream corresponding to the characters and attributes within aRange.

- RTFFromRange:

Returns an NSData object that contains an RTF stream corresponding to the characters and attributes within aRange, omitting any attachment characters and attributes.