Indy 9
TOnGetFileSizeEvent
Unit: IdFTPServer
TOnGetFileSizeEvent = procedure (ASender: TIdFTPServerThread; const AFilename: string; var VFileSize: Int64) of object;
Unit
IdFTPServer
Parameters
AFilename
File name requested.
AFileSize
Size of the requested file.
ASender
Client connection for the event notification.
Description
TOnGetFileSizeEvent is an event type signalled when an FTP server needs to determine the size of a file on the local file system after receiving the FTP SIZE command verb.

TOnGetFileSizeEvent the event type signalled to the TIdFTPServer.OnGetFileSize event handler. The event notification allows the event handler to implement the Operating System and Platform-specific API function calls needed to determine the size of the file specific in AFilename.

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

Note: The event handler must update the value specified in AFileSize to allow the command event handler for the FTP SIZE command verb to return the value in its response. AFileSize can contain -1 when the size file specified in AFilename cannot be determined, or has been aborted.


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