3.12. lf.win.shell.thumbsdb — Thumbnail cache (thumbs.db) files

This module contains classes to read Microsoft Windows thumbnail cache (thumbs.db) files.

class lf.win.shell.thumbsdb.ThumbsDb(cfb)

Represents a thumbs.db file.

Parameter:cfb (CompoundFile) – An OLE compound file that represents the thumbs.db file.
Raises KeyError:
 If catalog_name is not found in cfb.
catalog
An instance of a Catalog object.
thumbnails
A dictionary of Thumbnail objects. The keys are the numeric indices.
class lf.win.shell.thumbsdb.Thumbnail

Represents a thumbnail in a thumbs.db file.

size
The total size of the entry.
data
The raw thumbnail data.
from_stream(stream, offset=None):

Creates a Thumbnail object from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
Return type:

Thumbnail

Returns:

The corresponding Thumbnail object.

class lf.win.shell.thumbsdb.Catalog

Represents the catalog of information in a thumbs.db file.

width
The width (in pixels) of the thumbnails.
height
The height (in pixels) of the thumbnails.
item_count
The number of catalog entries. (extracted)
entries
A list of CatalogEntry objects describing the thumbnails.
from_stream(stream, offset=None):

Creates a Catalog object from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
Return type:

Catalog

Returns:

The corresponding Catalog object.

class lf.win.shell.thumbsdb.CatalogEntry

Represents an entry in a Catalog.

size
The total size of the catalog entry.
id
The numeric identifier of the thumbnail, used to determine the corresponding stream name. Sometimes called the index.
mtime
The time the thumbnail was last modified.
file_name
The name of the file the thumbnail is associated with.
stream_name
The name of the corresponding OLE stream. (computed)
from_stream(stream, offset=None):

Creates a CatalogEntry object from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
Return type:

CatalogEntry

Returns:

The corresponding CatalogEntry object.

Previous topic

3.11. lf.win.shell.recyclebin.ctypes — Recycle bin ctypes

Next topic

3.13. lf.win.shell.thumbsdb.dtypes — Data types for thumbs.db files

This Page