internal Nfs3DirectoryEntry(XdrDataReader reader)
        {
            FileId = reader.ReadUInt64();
            Name   = reader.ReadString();
            Cookie = reader.ReadUInt64();
            if (reader.ReadBool())
            {
                FileAttributes = new Nfs3FileAttributes(reader);
            }

            if (reader.ReadBool())
            {
                FileHandle = new Nfs3FileHandle(reader);
            }
        }
示例#2
0
 internal Nfs3FileAttributes(XdrDataReader reader)
 {
     Type         = (Nfs3FileType)reader.ReadInt32();
     Mode         = (UnixFilePermissions)reader.ReadInt32();
     LinkCount    = reader.ReadUInt32();
     Uid          = reader.ReadUInt32();
     Gid          = reader.ReadUInt32();
     Size         = reader.ReadInt64();
     BytesUsed    = reader.ReadInt64();
     RdevMajor    = reader.ReadUInt32();
     RdevMinor    = reader.ReadUInt32();
     FileSystemId = reader.ReadUInt64();
     FileId       = reader.ReadUInt64();
     AccessTime   = new Nfs3FileTime(reader);
     ModifyTime   = new Nfs3FileTime(reader);
     ChangeTime   = new Nfs3FileTime(reader);
 }
示例#3
0
 internal Nfs3WriteResult(XdrDataReader reader)
 {
     Status           = (Nfs3Status)reader.ReadInt32();
     CacheConsistency = new Nfs3WeakCacheConsistency(reader);
     if (Status == Nfs3Status.Ok)
     {
         Count         = reader.ReadInt32();
         HowCommitted  = (Nfs3StableHow)reader.ReadInt32();
         WriteVerifier = reader.ReadUInt64();
     }
 }
示例#4
0
        public Nfs3ReadDirResult(XdrDataReader reader)
        {
            Status = (Nfs3Status)reader.ReadInt32();

            if (reader.ReadBool())
            {
                DirAttributes = new Nfs3FileAttributes(reader);
            }

            DirEntries = new List <Nfs3DirectoryEntry>();
            if (Status == Nfs3Status.Ok)
            {
                CookieVerifier = reader.ReadUInt64();

                while (reader.ReadBool())
                {
                    DirEntries.Add(new Nfs3DirectoryEntry(reader));
                }

                Eof = reader.ReadBool();
            }
        }
        internal Nfs3FileSystemStat(XdrDataReader reader)
        {
            TotalSizeBytes             = reader.ReadUInt64();
            FreeSpaceBytes             = reader.ReadUInt64();
            AvailableFreeSpaceBytes    = reader.ReadUInt64();
            FileSlotCount              = reader.ReadUInt64();
            FreeFileSlotCount          = reader.ReadUInt64();
            AvailableFreeFileSlotCount = reader.ReadUInt64();
            uint invarsec = reader.ReadUInt32();

            if (invarsec == UInt32.MaxValue)
            {
                Invariant      = TimeSpan.MaxValue;
                InvariantUntil = DateTime.MaxValue;
            }
            else
            {
                Invariant      = TimeSpan.FromSeconds(invarsec);
                InvariantUntil = DateTime.Now.Add(Invariant);
            }
        }