Instance Method

truncateFileAtOffset:

Truncates or extends the file represented by the receiver to a specified offset within the file and puts the file pointer at that position.

Declaration

- (void)truncateFileAtOffset:(unsigned long long)offset;

Parameters

offset

The offset within the file that will mark the new end of the file.

Discussion

If the file is extended (if offset is beyond the current end of file), the added characters are null bytes.

See Also

Operating on a File

- closeFile

Disallows further access to the represented file or communications channel and signals end of file on communications channels that permit writing.

- synchronizeFile

Causes all in-memory data and attributes of the file represented by the receiver to be written to permanent storage.