Esempio n. 1
0
 def __init__(self, _data):
     self.entries = _data
     assert (_data[0].object_type() == OBJ_TYPE_ROOT_STORAGE)
     log.debug("directory entries: %d" % len(_data))
     for i in range(0, len(self.entries)):
         self.entries[i].index = i
         self.entries[i].info()
     self._make_tree()
Esempio n. 2
0
 def info(self):
     log.debug("/---")
     log.debug("index: %d name: %s type: %d (%s)" %
               (self.index, self.directory_entry_name(), self.object_type(),
                types[self.object_type()]))
     log.debug("starting_sector: %d" % self.starting_sector())
     log.debug("siblings: %d %d" %
               (self.left_sibling(), self.right_sibling()))
     log.debug("child id: %d" % self.child_id())
     log.debug("stream size: %d" % self.stream_size())
Esempio n. 3
0
 def _make_tree(self):
     log.debug("make tree")
     for entry in self.entries:
         if entry.object_type() in (OBJ_TYPE_STORAGE,
                                    OBJ_TYPE_ROOT_STORAGE):
             entry.set_children(self.add_children(entry))
Esempio n. 4
0
 def __init__(self, _data, sector_size, _type=None):
     self.fat = _data
     self.sector_size = sector_size
     self.type = _type
     log.debug("fat (%d): %s" % (self.sector_size, self.fat))
Esempio n. 5
0
 def __init__(self, _data):
     self.difat = _data
     log.debug("difat: %s" % self.difat)