[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'oldlinux' (#rtl)

fdSeek

Set file pointer position.

Declaration

Source position: oldlinux.pp line 1387

function fdSeek(

  fd: LongInt;

  pos: LongInt;

  seektype: LongInt

):LongInt;

Description

fdSeek sets the current fileposition of file fd to Pos, starting from SeekType, which can be one of the following:

Seek_Set
Pos is the absolute position in the file.
Seek_Cur
Pos is relative to the current position.
Seek_end
Pos is relative to the end of the file.

The function returns the new fileposition, or -1 of an error occurred.

For an example, see fdOpen.

Errors

Errors are returned in LinuxError.

See also

fdOpen

  

Open file and return file descriptor

fdWrite

  

Write data to file descriptor

fdClose

  

Close file descriptor

fdRead

  

Read data from file descriptor

fdTruncate

  

Truncate file on certain size.

fdFlush

  

Flush kernel file buffer

The latest version of this document can be found at lazarus-ccr.sourceforge.net.