help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Classes][Procedures and functions] Reference for unit 'Pipes' (#fcl)

TInputPipeStream.Seek

Set the current position of the stream

Declaration

Source position: pipes.pp line 39

public function TInputPipeStream.Seek(

  Offset: LongInt;

  Origin: Word

):LongInt; override;

Arguments

Offset

  

Offset, in bytes, starting at Origin

Origin

  

Where to start counting Offset bytes.

Function result

New position of the stream.

Description

Seek overrides the standard Seek implementation. Normally, pipe streams stderr are not seekable. The TInputPipeStream stream tries to provide seek capabilities for the following limited number of cases:

Origin=soFromBeginning
If Offset is larger than the current position, then the remaining bytes are skipped by reading them from the stream and discarding them.
Origin=soFromCurrent
If Offset is zero, the current position is returned. If it is positive, then Offset bytes are skipped by reading them from the stream and discarding them, if the stream is of type iosInput.

All other cases will result in a EPipeSeek exception.

Errors

An EPipeSeek exception is raised if the stream does not allow the requested seek operation.

See also

EPipeSeek

  

Exception raised when an invalid seek operation is attempted on a pipe.

Seek

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505