Instance Method

seekToEndOfFile()

Puts the file pointer at the end of the file referenced by the receiver and returns the new file offset.

Declaration

func seekToEndOfFile() -> 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

Raises an exception if the message is sent to an NSFileHandle object representing a pipe or socket or if the file descriptor is closed.

See Also

Seeking Within a File

var offsetInFile: UInt64

The position of the file pointer within the file represented by the receiver.

func seek(toFileOffset: UInt64)

Moves the file pointer to the specified offset within the file represented by the receiver.