TBufferedFileStream.Seek function
Moves the position in the buffer relative to the specified origin.
Declaration
function Seek(Offset: LongInt; Origin: Word): LongInt; override
; overload
function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64
; override; overloadArguments
Offset | Number of bytes to move the stream position relative to its origin. |
Origin | Stream position used as the origin for the relative movement. |
Function result
Number of bytes the stream position was moved, or -1 when not moved.
Description
Seek is a method used to change the current position in
the buffered file stream by the number of bytes in
Offset
relative to the given
Origin. Overloaded variants are provided
which use
LongInt or
Int64 types for the Offset
parameter, and
Word or
TSeekOrigin types for the
Origin parameter.
Seek is overridden to use the size and position in the internal buffer when positioning the buffered file stream.
The return value contains the actual number of bytes the position was
moved relative to the Origin. As with TStream, the return value
may contain -1 if the stream position was not moved.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
