function Delete(what)


The Delete method attempts to delete a file from the remote server, and returns true if deletion was successful or false if it wasn't.


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.Delete('/docs/some_document.docx');
  // ...
  scli.Close();
 }
 scli = null
}