FFlush Function

Action

Flushes buffered data to the file.

Include file

kernel.bdh

Syntax

FFlush( in hFile : number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hFile Valid handle to an open file. This handle must have been returned from a previous call to FOpen.

Example

transaction TMain
var
  hFile : number;
begin
  // create new file and write string to file
  FOpen(hFile, "c:\\temp\\dummyfile.txt", OPT_FILE_ACESS_READWRITE, OPT_FILE_CREATE); 
  FWrite(hFile, "Hello World");
  // flush data to file
  FFlush(hFile);
  // close file
  FClose(hFile);
end TMain;