GetLastCommand / GetLastCommandWithParm
ts
GetLastCommand(): string;
GetLastCommandWithParm(): string;GetLastCommand() returns the name of the last command issued by the client that was successfully handled by the server, without path arguments (e.g. "LIST", "PUT", "DELETE").
GetLastCommandWithParm() returns the same command name followed by the current relative path and, where applicable, the target path (e.g. "PUT /incoming/report.csv").
NOTE
Both functions reflect the last fully completed operation. They do not change while a command is in progress.
Example
ts
{
// Client just uploaded /incoming/report.csv
var cmd = Session.GetLastCommand(); // "PUT"
var full = Session.GetLastCommandWithParm(); // "PUT /incoming/report.csv"
Log("Last command: " + cmd);
Log("Last command (with path): " + full);
}