Back to product page

ExtendedCmd method


Sends extended command to the server.

Type

None

Syntax

  • Basic
object.ExtendedCmd Command, Data
The ExtendedCmd(object,Command,Data) syntax has these parts:
objectAn expression evaluating to an object of type wodSFTP.
CommandRequired. A String value. Command text.
DataRequired. A Variant value. Command data, if any.

Remarks

This method will send SSH_FXP_EXTENDED packet to remote server. It is assumed that Data argument contains preformatted data that follows rules of SSH protocol, and that follows rules of extended command that is being sent. If you provide Data with String or numeric value, then wodSFTP sends it with leading 4 bytes as their size, and then actual data. If you provide Data as byte array, then byte array is sent 'as is' without interference of wodSFTP.

ExtendedCmdReply event will be fired if command was successful and has some data to return back. Done event will be fired if there was an error, or only simple OK was returned by remote side. Only of of those events will be fired, never both.

You should also check Extensions property to determine what extensions are supported by the server, since most of them will announce supported extensions during connection time.

Platforms

Windows