Renci.SshNet.Sftp.SftpSession.RequestLStat C# (CSharp) Méthode

RequestLStat() public méthode

Performs SSH_FXP_LSTAT request.
public RequestLStat ( string path ) : SftpFileAttributes
path string The path.
Résultat SftpFileAttributes
        public SftpFileAttributes RequestLStat(string path)
        {
            SshException exception = null;

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

                SendRequest(request);

                WaitOnHandle(wait, OperationTimeout);
            }

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

            return attributes;
        }