Contents

truncateFile(atOffset:)

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

Declaration

func truncateFile(atOffset offset: UInt64)

Parameters

  • offset:

    The offset within the file that marks 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

Deprecated