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



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

FppWrite

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

Declaration

Source position: line 0

function FpPWrite(

  fd: cint;

  buf: pChar;

  nbytes: TSize;

  offset: TOff

):TsSize;

function FppWrite(

  fd: cint;

  const buf;

  nbytes: TSize;

  offset: TOff

):TsSize;

Description

FpPWrite writes nbytes bytes from buffer buf into file descriptor fd 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 written, or -1 on error.

Errors

On error, -1 is returned.

See also

FpPRead

  

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

FpWriteV

  

Vector write: Write from multiple buffers to a file descriptor

Notes

 No notes exist for this page yet. 





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