Close (disconnect)¶
function Close(): boolean
The Close()
function of each AFT client object disconnects from the remote service.
If the disconnection was carried out gracefully, this function returns true, otherwise it returns false.
{
var cli = new SftpClient();
cli.Host = 'your.sftpserver.com:22';
cli.User = 'someusername';
cli.KeyFile = './my_id.rsa';
if (cli.Connect()) {
// perform your file transfers...
// ...
// ...
cli.Close();
}
cli = null
}