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



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

FileRead

Read data from a filehandle in a buffer.

Declaration

Source position: filutilh.inc line 77

function FileRead(

  Handle: THandle;

  var Buffer;

  Count: LongInt

):LongInt;

Description

FileRead reads Count bytes from file-handle Handle and stores them into Buffer. Buffer must be at least Count bytes long. No checking on this is performed, so be careful not to overwrite any memory. Handle must be the result of a FileOpen call.

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

For an example, see FileCreate

Errors

On error, -1 is returned.

See also

FileClose

  

Close a file handle.

FileWrite

  

Write data from a buffer to a given filehandle.

FileCreate

  

Create a new file and return a handle to it.

FileOpen

  

Open an existing file and return a filehandle

FileTruncate

  

Truncate an open file to a given size.

FileSeek

  

Set the current file position on a file handle.

Notes

 No notes exist for this page yet. 





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