public void RenameFile(string oldPath, string newPath, bool isPosix)
{
CheckDisposed();
if (oldPath == null)
throw new ArgumentNullException("oldPath");
if (newPath == null)
throw new ArgumentNullException("newPath");
if (_sftpSession == null)
throw new SshConnectionException("Client not connected.");
var oldFullPath = _sftpSession.GetCanonicalPath(oldPath);
var newFullPath = _sftpSession.GetCanonicalPath(newPath);
if (isPosix)
{
_sftpSession.RequestPosixRename(oldFullPath, newFullPath);
}
else
{
_sftpSession.RequestRename(oldFullPath, newFullPath);
}
}