public void RequestSymLink(string linkpath, string targetpath)
{
if (ProtocolVersion < 3)
{
throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, "SSH_FXP_SYMLINK operation is not supported in {0} version that server operates in.", ProtocolVersion));
}
SshException exception = null;
using (var wait = new AutoResetEvent(false))
{
var request = new SftpSymLinkRequest(ProtocolVersion, NextRequestId, linkpath, targetpath, Encoding,
response =>
{
exception = GetSftpException(response);
wait.Set();
});
SendRequest(request);
WaitOnHandle(wait, OperationTimeout);
}
if (exception != null)
{
throw exception;
}
}