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

RequestFSetStat() public method

Performs SSH_FXP_FSETSTAT request.
public RequestFSetStat ( byte handle, SftpFileAttributes attributes ) : void
handle byte The handle.
attributes SftpFileAttributes The attributes.
return void
        public void RequestFSetStat(byte[] handle, SftpFileAttributes attributes)
        {
            SshException exception = null;

            using (var wait = new AutoResetEvent(false))
            {
                var request = new SftpFSetStatRequest(ProtocolVersion, NextRequestId, handle, attributes,
                    response =>
                        {
                            exception = GetSftpException(response);
                            wait.Set();
                        });

                SendRequest(request);

                WaitOnHandle(wait, OperationTimeout);
            }

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