internal KeyValuePair<string, SftpFileAttributes>[] RequestRealPath(string path, bool nullOnError = false)
{
SshException exception = null;
KeyValuePair<string, SftpFileAttributes>[] result = null;
using (var wait = new AutoResetEvent(false))
{
var request = new SftpRealPathRequest(ProtocolVersion, NextRequestId, path, Encoding,
response =>
{
result = response.Files;
wait.Set();
},
response =>
{
exception = GetSftpException(response);
wait.Set();
});
SendRequest(request);
WaitOnHandle(wait, OperationTimeout);
}
if (!nullOnError && exception != null)
{
throw exception;
}
return result;
}