function DelTree(directory)


The DelTree function deletes a directory tree, by recursively deleting also all files and sub-directories in it.
This function returns true if the directory tree was successfully deleted. If for any other reason it could not be deleted, this function returns false.


Example:

{
 var scli = new SftpClient();
 scli.Host = 'your.sftpserver.com:22';
 scli.User = 'someusername';
 scli.KeyFile = './my_id.rsa';
 if (scli.Connect()) {
  // perform your file transfers...
  // ...
  scli.DelTree('/docs/some_directory');
  // ...
  scli.Close();
 }
 scli = null
}