File.seek

void seek(long offset, int origin = SEEK_SET) @trusted

Calls fseek for the file handle to move its position indicator.

Parameters

offsetBinary files: Number of bytes to offset from origin.
Text files: Either zero, or a value returned by tell.
originBinary files: Position used as reference for the offset, must be one of SEEK_SET, SEEK_CUR or SEEK_END.
Text files: Shall necessarily be SEEK_SET.

Throws

Exception if the file is not opened.

ErrnoException if the call to fseek fails.