Internet Direct (Indy) Version 9.0.1 Beta
TIdFTPServer.OnChangeDirectory
Allows the server to select a file system path.

property OnChangeDirectory: TOnDirectoryEvent;
Description
OnChangeDirectory is a TOnDirectoryEvent property that represents the event handler signalled when the FTP server performs the FTP CWD or CDUP command verbs. OnChangeDirectory allows the server to perform platform-specific API calls needed to change the currently selected file system path to the desired location specified in ADirectory.

ASender is the threaded client connection for the event notification. ADirectory is the file system path to be selected after execution of the command event handler. ADirectory will contain the directory path after resolving the directory path using the file handling required for the system in EmulateSystem. When triggered for the FTP CDUP command, ADirectory contains the notation required to change to the parent directory in the local file system.

An FTP server implementation must assign a procedure to the event handler to allow responding to the event notifications. The TIdFTPServerThread.CurrentDir property will be updated to the value used by the event handler.