Contents

seekToEnd()

Places the file pointer at the end of the file referenced by the file handle and returns the new file offset.

Declaration

@discardableResult func seekToEnd() throws -> UInt64

Return Value

The file offset with the file pointer at the end of the file. This is therefore equal to the size of the file.

Discussion

Throws an error if called a file handle representing a pipe or socket, or if the file descriptor is closed.

See Also

Seeking Within a File