public void RequestRmDir(string path)
{
SshException exception = null;
using (var wait = new AutoResetEvent(false))
{
var request = new SftpRmDirRequest(ProtocolVersion, NextRequestId, path, Encoding,
response =>
{
exception = GetSftpException(response);
wait.Set();
});
SendRequest(request);
WaitOnHandle(wait, OperationTimeout);
}
if (exception != null)
{
throw exception;
}
}