Instance Method


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


func truncateFile(atOffset offset: UInt64)



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


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

func closeFile()

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

func synchronizeFile()

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