OnFlushFile event/delegate/callback

Filter:

Pascal    C++ (Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET    Java 

CBFSConnect     See also    

Overview

This event is fired when the OS needs to flush the data of the open file or volume.

Declaration

[Pascal]
    property OnFlushFile : TCBFlushFileEvent;
    TCBFlushFileEvent = procedure( Sender : TObject; FileInfo: TCBFileInfo ) of object;

[C++ (Lib)]
    void (__stdcall *CBFlushFileEvent)(void* Sender, CBFileInfo* FileInfo );

[C++ (VCL)]
    typedef void (__closure *TCBFlushFileEvent)( System::TObject* Sender, TCBFileInfo* FileInfo );

[C++ (.NET)]
    public __delegate void CBFlushFileEvent( CBFSConnect^ Sender, CBFileInfo^ FileInfo );

[C#]
    public void CBFlushFileEvent( CBFSConnect Sender, CBFileInfo FileInfo );

[VB.NET]
    Sub CBFlushFileEvent( ByVal Sender As CBFSConnect, ByVal FileInfo As CBFileInfo )

[Java]
    void ICbFsFileEvents.onFlushFile( CBFSConnect sender, CBFileInfo fileInfo );

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • FileInfo - contains information about the file. Can be nil / NULL / null / Nothing

Description

This event is fired when the OS tells the file system, that file buffers (incuding all possible metadata) must be flushed and written to the backend storage. FileInfo contains information about the file to be flushed. If FileInfo is empty, your code should attempt to flush everything, related to the disk.

Error handling

See Error handling topic for detailed information about how to report errors, which occur in the event handlers, back to CBFS Connect. Throwing ECBFSConnectError exception from this event handler will not cause the OS to abort the operation or display an error message to the user.

See also

OnWriteFile