OnDeleteFile 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 delete the file or directory.

Declaration

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

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

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

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

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

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

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

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • FileInfo - contains the information about the file

Description

This event is fired when the OS needs to delete the file or directory. There's no way to cancel deletion of the file or directory from this event. If your application needs to prevent deletion, you need to do this in OnCanFileBeDeleted callback/event handler.

The event is fired, when the file is fully closed. The handle and UserContext that FileInfo contains are not valid.

See also

OnCanFileBeDeleted