methodTstSFTPClient.PutFile
procedure PutFile(const aSource : TStream; const aDestFile: string; const aAppend : Boolean = False); overload;
Core upload routine: writes a source stream to a remote file in requests of up to 128 KB, each at the offset in the remote file that equals its position in the stream. Without aAppend the remote file is created, or truncated if it exists, and the whole stream is written from position 0. With aAppend the remote file is opened, or created if it does not exist, without truncating it, and the stream is written from its current position. The open flags for protocol version 3 or 5 are chosen from the negotiated version. Raises eSFTPStatusError when the server refuses the open or a write, and eSFTPClientError when it answers a write with SSH_FX_EOF; the remote file then holds what was written before it.
procedure PutFile(const aSourceFile: string; const aDestFile : string; const aAppend : Boolean = False); overload;
Uploads a local file by name to a remote file, opening the local file read-shared and delegating to the stream overload above.