function DownloadR(what, toWhere)

The DownloadR function download the file(s) specified in the what parameter (supports wildcards) from the remote file server to the toWhere destination directory on the local file system. This function is recursive, therefore when using wildcards, this function will also download matching files from sub-directories of the directory specified in the what parameter.


 var scli = new SftpClient();
 scli.Host = '';
 scli.User = 'someusername';
 scli.KeyFile = './my_id.rsa';
 if (scli.Connect()) {
  // perform your file transfers...
  // ...
  scli.DownloadR('/archive/docs/*.docx', './docs');
  // ...
 scli = null