public static DirectoryHeader ReadFrom(MetablockReader reader) { DirectoryHeader result = new DirectoryHeader(); result.Count = reader.ReadInt(); result.StartBlock = reader.ReadInt(); result.InodeNumber = reader.ReadInt(); return(result); }
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()); }