OnCanFileBeDeletedN event/delegate/notification

Filter:

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

CBFSFilter     See also    

Overview

This notification callback is called when the OS needs to query the possibility to delete the file or directory.

Declaration

[Pascal]
    property OnCanFileBeDeletedN : TCBFSFltCanFileBeDeletedEventN;
    TCBFSFltCanFileBeDeletedEventN = procedure(Sender : TObject; FileName : TCBString; DeleteFile : boolean; Status : DWORD ) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    typedef void (*CBFSFltCanFileBeDeletedEventN)(CBFSFilter* Sender, LPWSTR FileName, BOOL DeleteFile, LONG Status);

[C++ (VCL)]
    typedef void __fastcall (__closure *TCBFSFltCanFileBeDeletedEventN)(System::TObject* Sender, TCBString FileName, bool DeleteFile, DWORD Status);

[C++ (.NET)]
    public delegate void CBFSFltCanFileBeDeletedEventN(CBFSFilter^ Sender, String^ FileName, bool DeleteFile, Int32 Status);

[C#]
    delegate void CBFSFltCanFileBeDeletedEventN(CBFSFilter Sender, string FileName, bool DeleteFile, Int32 Status);

[VB.NET]
    Delegate Sub CBFSFltCanFileBeDeletedEventN(ByVal Sender As CBFSFilter, ByVal FileName As String, ByVal DeleteFile As Boolean, ByVal Status As Int32)

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • DeleteFile - indicates whether the file will be deleted
  • FileName - name of the file
  • Status - status code of the completed operation

Description

This notification callback is called when the OS needs to check if the file or directory can be deleted. When the callback/event handler is called, DeleteFile contains the value of the flag set by the OS or the application to indicate whether the file should be deleted. The OS or the application can set and clear the deletion flag in any order.

See also

OnCanFileBeDeletedC     OnPostCanFileBeDeletedC