Пример #1
0
 public static DirectoryHeader ReadFrom(MetablockReader reader)
 {
     DirectoryHeader result = new DirectoryHeader();
     result.Count = reader.ReadInt();
     result.StartBlock = reader.ReadInt();
     result.InodeNumber = reader.ReadInt();
     return result;
 }
Пример #2
0
        public static DirectoryHeader ReadFrom(MetablockReader reader)
        {
            DirectoryHeader result = new DirectoryHeader();

            result.Count       = reader.ReadInt();
            result.StartBlock  = reader.ReadInt();
            result.InodeNumber = reader.ReadInt();
            return(result);
        }
Пример #3
0
        private int GetId(ushort idKey)
        {
            int recordsPerBlock = MetadataBufferSize / 4;
            int block           = idKey / recordsPerBlock;
            int offset          = idKey % recordsPerBlock;

            MetablockReader reader = _context.UidGidTableReaders[block];

            reader.SetPosition(0, offset * 4);
            return(reader.ReadInt());
        }