Exemple #1
0
        public Nfs3Client(string address, RpcCredentials credentials, string mountPoint)
        {
            _rpcClient = new RpcClient(address, credentials);
            _mountClient = new Nfs3Mount(_rpcClient);
            _rootHandle = _mountClient.Mount(mountPoint).FileHandle;

            _nfsClient = new Nfs3(_rpcClient);

            Nfs3FileSystemInfoResult fsiResult = _nfsClient.FileSystemInfo(_rootHandle);
            _fsInfo = fsiResult.FileSystemInfo;
            _cachedAttributes = new Dictionary<Nfs3FileHandle, Nfs3FileAttributes>();
            _cachedAttributes[_rootHandle] = fsiResult.PostOpAttributes;
        }
        internal Nfs3FileSystemInfoResult(XdrDataReader reader)
        {
            Status = (Nfs3Status)reader.ReadInt32();
            if (reader.ReadBool())
            {
                PostOpAttributes = new Nfs3FileAttributes(reader);
            }

            if (Status == Nfs3Status.Ok)
            {
                FileSystemInfo = new Nfs3FileSystemInfo(reader);
            }
        }
        public Nfs3Client(string address, RpcCredentials credentials, string mountPoint)
        {
            _rpcClient   = new RpcClient(address, credentials);
            _mountClient = new Nfs3Mount(_rpcClient);
            _rootHandle  = _mountClient.Mount(mountPoint).FileHandle;

            _nfsClient = new Nfs3(_rpcClient);

            Nfs3FileSystemInfoResult fsiResult = _nfsClient.FileSystemInfo(_rootHandle);

            _fsInfo           = fsiResult.FileSystemInfo;
            _cachedAttributes = new Dictionary <Nfs3FileHandle, Nfs3FileAttributes>();
            _cachedAttributes[_rootHandle] = fsiResult.PostOpAttributes;
        }
Exemple #4
0
        public bool Equals(Nfs3FileSystemInfo other)
        {
            if (other == null)
            {
                return(false);
            }

            return(other.ReadMaxBytes == ReadMaxBytes &&
                   other.ReadPreferredBytes == ReadPreferredBytes &&
                   other.ReadMultipleSize == ReadMultipleSize &&
                   other.WriteMaxBytes == WriteMaxBytes &&
                   other.WritePreferredBytes == WritePreferredBytes &&
                   other.WriteMultipleSize == WriteMultipleSize &&
                   other.DirectoryPreferredBytes == DirectoryPreferredBytes &&
                   other.MaxFileSize == MaxFileSize &&
                   object.Equals(other.TimePrecision, TimePrecision) &&
                   other.FileSystemProperties == FileSystemProperties);
        }