Indy 9 | Content | Index | Reference

TOnListDirectoryEvent
Unit: IdFTPServer
Event type signalled when a directory listing is needed for an FTP client connection.

    TOnListDirectoryEvent = procedure (ASender: TIdFTPServerThread; const APath: string; ADirectoryListing: TIdFTPListItems) of object;

Unit
IdFTPServer
Parameters
ADirectoryListing
Collection of file items for the listing.
APath
File system directory for the listing.
ASender
Client connection for the event notification.
Description
TOnListDirectoryEvent is an event type signalled when an FTP server implementation needs to prepare and process a directory listing for the client connection.

TOnListDirectoryEvent is the event type signalled to the TIdFTPServer.OnListDirectory event handler when the command event handler for the FTP LIST command verb is executed. TOnListDirectoryEvent allows the server to examine, validate, or maintain items that appear in the directory listing.

The event handler allows the server to use properties from the connection for the thread client specified in ASender, the current directory in APath, and the collection with file information in ADirectoryListing. The event handler can also add or delete TIdFTPListItem entries in ADirectoryListing prior to constructing the text returned in to the client connection.

An FTP server implementation must assign a procedure to the event handler for the TOnListDirectoryEvent event to allow responding to the event notification.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.