TScSFTPServerGetAbsolutePathEvent = procedure(Sender: TObject; SFTPSessionInfo: TScSFTPSessionInfo; const Path: string; const Control: TScSFTPRealpathControl; ComposePath: TStringList; out AbsolutePath: string; var Error: TScSFTPError) of object;


property OnGetAbsolutePath: TScSFTPServerGetAbsolutePathEvent;



The OnGetAbsolutePath event occurs on request from an SFTP client to canonize the given path name to the absolute canonical one. The OnGetAbsolutePath event handler should convert path names containing ".." components or relative path names without a leading slash into absolute paths. To get an absolute path from a relative one, the SFTPSessionInfo.HomePath property value should be added at the beginning of the relative path.

You can call the DefaultGetAbsolutePath 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 - original path which should be resolved into an absolute canonical path.
Control - the parameters of identifying the absolute path.
ComposePath - specifies multiple elements, in which case an event handler should build the resulting path by applying each compose path to the accumulated result until all elements have been applied.
AbsolutePath - a parameter to pass the resolved absolute path.
Error - a parameter to pass the information about an error that can arise when resolving an absolute path.


See also



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