Internet Direct (Indy) Version 9.0.1 Beta
TOnRetrieveFileEvent
Event type signalled to allow an FTP server to retrieve a file.

TOnRetrieveFileEvent = procedure (ASender: TIdFTPServerThread; AFilename: String; var AStream: TStream) of object;
Description
TOnRetrieveFileEvent is an event type signalled when an FTP server implementation needs to retrieve a file on the local file system after receiving the FTP RETR command verb from a client connection.

TOnRetrieveFileEvent is the type used to represent the TIdFTPServer.OnRetrieveFile property, allows the RETR command event handler to perform processing required to load the contents of the file specified in AFilename into a stream constructed by the TOnRetrieveFileEvent event handler. AStream is a variable parameter that contains a reference to the stream created by the event Handler, or Nil if the operation could not be performed by the event handler.

The FTP server implementation must assign a procedure to the TOnRetrieveFileEvent event handler to allow responding to the event notification.