TScSFTPServerOpenDirectoryEvent = procedure(Sender: TObject; SFTPSessionInfo: TScSFTPSessionInfo; const Path: string; out Data: TObject; var Error: TScSFTPError) of object;


property OnOpenDirectory: TScSFTPServerOpenDirectoryEvent;



The OnOpenDirectory event occurs on request from an SFTP client to open an existing directory for reading. The returned Data object may be used in other event handlers, for example, in OnReadDirectory, OnCloseFile.

You can call the DefaultOpenDirectory method to execute this operation or write your own implementation.



Sender - the object whose event handler is called.
SFTPSessionInfo - contains the information about the current SFTP session.
Path - is the path name of the directory to be listed (without any trailing slash). If Path does not refer to a directory, an event handler should return an error. To get an absolute directory path, use the GetFullPath method.
Data - a parameter to pass the information about an opened directory as the TScSearchRec object or any user's object.
Error - a parameter to pass the information about an error that can arise when opening a directory.


See also



SecureBridge Components, Copyright © 2007-2021 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support