Renci.SshNet.Sftp.SftpSession.RequestRemove C# (CSharp) Method

RequestRemove() public method

Performs SSH_FXP_REMOVE request.
public RequestRemove ( string path ) : void
path string The path.
return void
        public void RequestRemove(string path)
        {
            SshException exception = null;

            using (var wait = new AutoResetEvent(false))
            {
                var request = new SftpRemoveRequest(ProtocolVersion, NextRequestId, path, Encoding,
                    response =>
                        {
                            exception = GetSftpException(response);
                            wait.Set();
                        });

                SendRequest(request);

                WaitOnHandle(wait, OperationTimeout);
            }

            if (exception != null)
            {
                throw exception;
            }
        }