Function: download()
ts
function download(
source,
localPath,
options?
): Promise<TransferResult>;Connects, downloads and disconnects in one call.
Parameters
| Parameter | Type |
|---|---|
source | string | RemoteTarget |
localPath | string |
options | CopyOptions |
Returns
Promise<TransferResult>
Example
ts
await download('root@192.168.1.1:/etc/config', './backup/config', { recursive: true, password });