Seek to offset bytes from the beginning of the file.

Synopsis

Declared in <bdls_fdstreambuf.h>

virtual
pos_type
seekpos(
    pos_type offset,
    std::ios_base::openmode mode = bsl::ios_base::in | bsl::ios_base::out) override;

Description

Seek to the specified offset relative to the beginning of the file. Return the resulting absolute position in the file relative to the beginning. Optionally specify mode which is ignored. Also note that seeks are always in terms of bytes on the device, meaning that on a Windows text file, seeking past a `\r ` sequence on the disk will count as two bytes, though if it is read in it will be a single ` ` byte.

Return Value

the resulting absolute position in the file on success

Parameters

Name

Description

offset

byte offset from the beginning of the file

mode

ignored open‐mode flags

Created with MrDocs