RequestRealPath() private method

Performs SSH_FXP_REALPATH request
private RequestRealPath ( string path, bool nullOnError = false ) : SftpFileAttributes>[].KeyValuePair
path string The path.
nullOnError bool if set to true returns null instead of throwing an exception.
return SftpFileAttributes>[].KeyValuePair
コード例 #1
0
ファイル: SftpFilesystem.cs プロジェクト: cpascal/win-sshfs
        protected override void OnConnected()
        {
            base.OnConnected();

            _sftpSession = new SftpSession(Session, _operationTimeout, Encoding.UTF8);

            _sftpSession.Connect();

            _userId = GetUserId();
            if (_userId != -1)
                _userGroups = new HashSet<int>(GetUserGroupsIds());

            if (String.IsNullOrWhiteSpace(_rootpath))
            {
                _rootpath = _sftpSession.RequestRealPath(".").First().Key;
            }

            _supportsPosixRename =
                _sftpSession._supportedExtensions.Contains(new KeyValuePair<string, string>("*****@*****.**", "1"));
            _supportsStatVfs =
                _sftpSession._supportedExtensions.Contains(new KeyValuePair<string, string>("*****@*****.**", "2"));
            // KeepAliveInterval=TimeSpan.FromSeconds(5);

               //  Session.Disconnected+= (sender, args) => Debugger.Break();
        }