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

RequestSetStat() public method

Performs SSH_FXP_SETSTAT request.
public RequestSetStat ( string path, SftpFileAttributes attributes ) : void
path string The path.
attributes SftpFileAttributes The attributes.
return void
        public void RequestSetStat(string path, SftpFileAttributes attributes)
        {
            SshException exception = null;

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

                SendRequest(request);

                WaitOnHandle(wait, OperationTimeout);
            }

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