Append Method
Append data from a local file; to a remote file using SFTP.
Syntax
public String append();
Remarks
This method Appends the data from LocalFile to the RemoteFile. The StartTransfer, Transfer, and EndTransfer events provide details about the individual file transfers. If the LocalFile property is "" (empty string) then the file data will be available through the Transfer event.
This method returns an Operation Id which identifies the operation in progress. A corresponding SSHPlexOperation will also be added to the Operations collection. The operation can be canceled by passing the Operation Id to the CancelOperation method.
When the operation completes the AppendComplete event will fire, and the SSHPlexOperation associated with the completed operation will be removed from the Operations collection. Inspect the parameters of the AppendComplete event to determine the result.
If there is no SSH session in place, one is automatically created by the component first.
This method is only applicable when ChannelType is set to cstSftp.
Code Example
SSHPlexControl.Localfile = "C:\localfile.txt"; SSHPlexControl.RemoteFile = "remotefile.txt"; string operationId = SSHPlexControl.Append(); // Use Path in RemoteFile SSHPlexControl.Localfile = "C:\localfile2.txt"; SSHPlexControl.RemoteFile = "folder/remotefile2.txt"; string operationId = SSHPlexControl.Append();