After making a sftp connection, using the function ListDirectory(path), checking IsConnected and if so calling Disconnect() will raise an exception.
↧