Discuss this help topic in CBFS Forum

OnCloseDirectoryEnumeration event/delegate/callback


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

CallbackFileSystem     See also    


The event is fired when the OS has finished enumerating contents of the directory.


    property OnCloseDirectoryEnumeration : TCbFsCloseDirectoryEnumerationEvent;
    TCbFsCloseDirectoryEnumerationEvent = procedure( Sender : TObject; DirectoryInfo: TCbFsFileInfo; EnumerationInfo: TCbFsDirectoryEnumerationInfo ) of object;

[C++ (Lib)]
    void (__stdcall *CbFsCloseDirectoryEnumerationEvent)(void* Sender, CbFsFileInfo* DirectoryInfo, CbFsDirectoryEnumerationInfo* EnumerationInfo );

[C++ (VCL)]
    typedef void (__closure *TCbFsCloseDirectoryEnumerationEvent)( System::TObject* Sender, CbFsFileInfo* DirectoryInfo, TCbFsDirectoryEnumerationInfo* EnumerationInfo );

[C++ (.NET)]
    public __delegate void CbFsCloseDirectoryEnumerationEvent( CallbackFileSystem^ Sender, CbFsFileInfo^ DirectoryInfo, CbFsDirectoryEnumerationInfo^ EnumerationInfo );

    public void CbFsCloseDirectoryEnumerationEvent( CallbackFileSystem Sender, CbFsFileInfo DirectoryInfo, CbFsDirectoryEnumerationInfo EnumerationInfo );

    Sub CbFsCloseDirectoryEnumerationEvent( ByVal Sender As CallbackFileSystem, ByVal DirectoryInfo As TCbFsFileInfo, ByVal EnumerationInfo As CbFsDirectoryEnumerationInfo )

    void ICbFsEnumerateEvents.onCloseDirectoryEnumeration( CallbackFileSystem sender, CbFsFileInfo directoryInfo, CbFsDirectoryEnumerationInfo enumerationInfo );


  • Sender - reference to the class that called the delegate/event handler.
  • DirectoryInfo - information about the directory which is being closed
  • EnumerationInfo - information about current enumeration


This event is fired when the OS has finished enumerating the directory contents and requests the resources, allocated for enumeration, to be released.
Read more about contexts.

Error handling

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

See also


Discuss this help topic in CBFS Forum