Unit 'bufstream' Package
[Overview][Constants][Classes][Index] [#fcl]

TBufferedFileStream.Seek

Moves the position in the buffer relative to the specified origin.

Declaration

Source position: bufstream.pp line 137

public function TBufferedFileStream.Seek(

  Offset: LongInt;

  Origin: Word

):LongInt; override; overload;

function TBufferedFileStream.Seek(

  const Offset: Int64;

  Origin: TSeekOrigin

):Int64; override; overload;

Arguments

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.

Arguments

Offset

  

Number of bytes to move the stream position relative to its origin.

Origin

  

Stream position used as the origin for the relative movement.

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

THandleStream.Seek

TStream.Seek


Documentation generated on: Nov 22 2024