GetAbsTargetPath()
ts
// in class: Session
function GetAbsTargetPath(): string;
This function returns the absolute path of the target file in the last file operation as pointed to by the current VFS.
So what is a target file? Only copy/rename/move operations have a source and a target path. For example, if you move file /docs/resume.pdf
to /archive/oldresume.pdf
then the target path is /archive/oldresume.pdf
.
Example
ts
{
// Let's say the current VFS is of type `Disk` and has its root in `C:\SFTPData`
// and the last file operation was a move of a file from `/docs/resume.pdf`
// to `/archive/oldresume.pdf`, then...
var atp = Session.GetAbsTargetPath();
Log(atp); // Will log `C:\SFTPData\archive\oldresume.pdf`
}