The OpenD Programming Language

File.seek

Calls $(CSTDIO fseek) for the file handle to move its position indicator.

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

Parameters

offset long

Binary files: Number of bytes to offset from origin.
Text files: Either zero, or a value returned by tell.

origin int

Binary 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.

Meta