Exemplo n.º 1
0
        private SftpFileAttributes GetAttributes(string path)
        {
            var sftpLStatAttributes = _sftpSession.RequestLStat(path, true);

            if (sftpLStatAttributes == null || !sftpLStatAttributes.IsSymbolicLink)
            {
                return(sftpLStatAttributes);
            }
            var sftpStatAttributes = _sftpSession.RequestStat(path, true);

            return(sftpStatAttributes ?? sftpLStatAttributes);
        }