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



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

FileTruncate

Truncate an open file to a given size.

Declaration

Source position: filutilh.inc line 82

function FileTruncate(

  Handle: THandle;

  Size: LongInt

):Boolean;

Description

FileTruncate truncates the file with handle Handle to Size bytes. The file must have been opened for writing prior to this call. The function returns True is successful, False otherwise.

For an example, see FileCreate.

Errors

On error, the function returns False.

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

FileRead

  

Read data from a filehandle in a buffer.

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