Instance Method

seek(toFileOffset:)

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

Declaration

func seek(toFileOffset offset: UInt64)

Parameters

offset

The offset to seek to.

Discussion

Raises an exception if the message is sent to an NSFileHandle object representing a pipe or socket, if the file descriptor is closed, or if any other error occurs in seeking.

See Also

Seeking Within a File

var offsetInFile: UInt64

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

func seekToEndOfFile() -> UInt64

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