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



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

FileWrite

Write data from a buffer to a given filehandle.

Declaration

Source position: filutilh.inc line 78

function FileWrite(

  Handle: THandle;

  const Buffer;

  Count: LongInt

):LongInt;

Description

FileWrite writes Count bytes from Buffer to the file with handle Handle. Prior to this call, the file must have been opened for writing. Buffer must be at least Count bytes large, or a memory access error may occur.

The function returns the number of bytes written, or -1 in case of an error.

For an example, see FileCreate.

Errors

In case of error, -1 is returned.

See also

FileClose

  

Close a file handle.

FileCreate

  

Create a new file and return a handle to it.

FileOpen

  

Open an existing file and return a filehandle

FileRead

  

Read data from a filehandle in a buffer.

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