Seeking is the act of moving around a file or file-like object.
Seeking is the act of moving around a file or file-like object.
ANSI C in section 2.3.12.10 specifies thatfseek has the argument structure:
int fseek(FILE *stream, long offset, int whence);
Where:
streamis the FILE object to seek (note that this does not have to physically be a file)offsetis how much, relative to thewhenceargumentwhenceis one of- SEEK_SET (offset is computed relative to the start of the file)
- SEEK_CUR (offset is computed relative to the current position)
- SEEK_END (offset is computed relative to the end of the file)
The majority of languages based upon C, and even many that aren't, have inherited something similar to fseek, but have probably put it somewhere else (ex. Python's file.seek). Check your language of choice's documentation for details.