Renci.SshNet.SftpClient.SymbolicLink C# (CSharp) Method

SymbolicLink() public method

Creates a symbolic link from old path to new path.
is null. -or- is null or contains only whitespace characters. Client is not connected. Permission to create the symbolic link was denied by the remote host. -or- A SSH command was denied by the server. A SSH error where is the message from the remote host. The method was called after the client was disposed.
public SymbolicLink ( string path, string linkPath ) : void
path string The old path.
linkPath string The new path.
return void
        public void SymbolicLink(string path, string linkPath)
        {
            CheckDisposed();

            if (path.IsNullOrWhiteSpace())
                throw new ArgumentException("path");

            if (linkPath.IsNullOrWhiteSpace())
                throw new ArgumentException("linkPath");

            if (_sftpSession == null)
                throw new SshConnectionException("Client not connected.");

            var fullPath = _sftpSession.GetCanonicalPath(path);

            var linkFullPath = _sftpSession.GetCanonicalPath(linkPath);

            _sftpSession.RequestSymLink(fullPath, linkFullPath);
        }