Instance Method


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


- (void)seekToFileOffset:(unsigned long long)offset;



The offset to seek to.


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


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

- seekToEndOfFile

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software