public void LoadBtree(Context context, long offset)
        {
            var data = context.RawStream;

            data.Position = offset + context.SuperBlock.Blocksize * Root;
            if (Level == 1)
            {
                RootInodeBtree = new BTreeInodeLeave();
            }
            else
            {
                RootInodeBtree = new BTreeInodeNode();
            }
            var buffer = Utilities.ReadFully(data, (int)context.SuperBlock.Blocksize);

            RootInodeBtree.ReadFrom(buffer, 0);
        }
 public override void LoadBtree(AllocationGroup ag)
 {
     Children = new Dictionary <uint, BtreeHeader>(NumberOfRecords);
     for (int i = 0; i < NumberOfRecords; i++)
     {
         BtreeHeader child;
         if (Level == 1)
         {
             child = new BTreeInodeLeave();
         }
         else
         {
             child = new BTreeInodeNode();
         }
         var data = ag.Context.RawStream;
         data.Position = (Pointer[i] * ag.Context.SuperBlock.Blocksize) + ag.Offset;
         var buffer = Utilities.ReadFully(data, (int)ag.Context.SuperBlock.Blocksize);
         child.ReadFrom(buffer, 0);
         child.LoadBtree(ag);
         Children.Add(Keys[i], child);
     }
 }