:py:mod:`dissect.thumbcache` ============================ .. py:module:: dissect.thumbcache Subpackages ----------- .. toctree:: :titlesonly: :maxdepth: 3 tools/index.rst Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 c_thumbcache/index.rst exceptions/index.rst index/index.rst thumbcache/index.rst thumbcache_file/index.rst util/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: dissect.thumbcache.IndexEntry dissect.thumbcache.ThumbnailIndex dissect.thumbcache.Thumbcache dissect.thumbcache.ThumbcacheEntry dissect.thumbcache.ThumbcacheFile .. py:exception:: Error Bases: :py:obj:`Exception` A generic exception for the thumbcache module. .. py:class:: IndexEntry(fh: BinaryIO, type: dissect.thumbcache.util.ThumbnailType) .. py:property:: header :type: dissect.cstruct.Structure .. py:property:: identifier :type: bytes .. py:property:: flags :type: int .. py:property:: cache_offsets :type: list[int] Retrieves the index data entries. These are offsets into the thumbcache files, where the order specifies in which of the files. More information about the order can be found in :class:`Thumbcache`. .. py:property:: last_modified :type: datetime.datetime .. py:method:: in_use() -> bool .. py:method:: __repr__() -> str Return repr(self). .. py:class:: ThumbnailIndex(fh: BinaryIO) .. py:property:: header :type: dissect.cstruct.Structure .. py:property:: version :type: int .. py:property:: type :type: dissect.thumbcache.util.ThumbnailType .. py:property:: total_entries :type: int .. py:property:: used_entries :type: int .. py:method:: entries() -> Iterator[IndexEntry] Returns all index entries that are actually used. .. py:class:: Thumbcache(path: pathlib.Path, prefix: str = 'thumbcache') This class combines the thumbnailindex and thumbcachefile. The class looks up all files inside ``path`` that have the same ``prefix``. :param path: The directory that contains the thumbcache files. :param prefix: The start of the name to search for. .. py:property:: mapping :type: dict[int, pathlib.Path] Looks at the version field in the cache file header. .. py:method:: entries() -> Iterator[tuple[pathlib.Path, dissect.thumbcache.thumbcache_file.ThumbcacheEntry]] Iterates through all the specific entries from the thumbcache files. .. py:method:: index_entries() -> Iterator[dissect.thumbcache.index.IndexEntry] Iterates through all the index entries that are in use. .. py:class:: ThumbcacheEntry(fh: BinaryIO, type: dissect.thumbcache.util.ThumbnailType) .. py:property:: hash :type: str .. py:property:: extension :type: str This property contains the extension type of the data (Only in VISTA). .. py:property:: data :type: bytes .. py:method:: __repr__() Return repr(self). .. py:class:: ThumbcacheFile(fh: BinaryIO) .. py:property:: header :type: dissect.cstruct.Structure .. py:property:: version :type: dissect.thumbcache.util.ThumbnailType .. py:attribute:: __slots__ :value: ['fh', '_header', 'signature', 'type', 'size', 'offset', '_entries', '_cached_entries'] This class defines a thumbcache file, that is usually denoted by thumbcache_*.db. Which is is different from the thumbcache_idx.db. :param fh: A file-like object. .. py:method:: __getitem__(key: int) -> ThumbcacheEntry .. py:method:: __getattribute__(__name: str) -> Any Return getattr(self, name). .. py:method:: entries() -> list[ThumbcacheEntry]