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

FppRead

Positional read: read from file descriptor at a certain position.

Declaration

Source position: bunxh.inc line 86

function FpPRead(

  fd: cint;

  buf: PChar;

  nbytes: TSize;

  offset: TOff

):TsSize;

function FppRead(

  fd: cint;

  var buf;

  nbytes: TSize;

  offset: TOff

):TsSize;

Description

FpPRead reads nbytes bytes from file descriptor fd into buffer buf starting at offset offset. Offset is measured from the start of the file. This function can only be used on files, not on pipes or sockets (i.e. any seekable file descriptor).

The function returns the number of bytes actually read, or -1 on error.

Errors

On error, -1 is returned.

See also

FpReadV

  

Vector read: Read into multiple buffers

FpPWrite

  

Positional write: write to file descriptor at a certain position.


Documentation generated on: Mar 17 2017