3.9. lf.win.shell.recyclebin — Recycle bin (INFO2)

This module contains code to work with INFO2 files (found in the Recycle bin directory).

3.9.1. Classes

class lf.win.shell.recyclebin.INFO2(stream, offset=None)

Represents an INFO2 file.

Parameters:
  • stream (IStream.) – A stream that contains the INFO2 file.
  • offset (int) – The start of the INFO2 file in stream.
header
An instance of a INFO2Header.
items
A list of INFO2Item objects.
class lf.win.shell.recyclebin.INFO2Header

Represents the header from an INFO2 file.

version
The version of the INFO2 file.
item_size
The size of an INFO2Item.
unknown1
The first unknown value (bytes 4-7)
unknown2
The second unknown value (bytes 8-11)
unknown3
The third unknown value (bytes 16-19)
class lf.win.shell.recyclebin.INFO2Item

Represents an item in an INFO2 file.

name_asc
The name of the deleted file (ASCII).
id
The numeric identifier of the deleted file. Sometimes called the index number.
drive_num
The drive number the file was deleted from.
dtime
The time the file was deleted.
file_size
The size of the deleted file.
name_uni
The name of the deleted file (unicode), or None if not present.
exists
True if the corresponding file exists on disk.
classmethod from_ctype(ctype)

Creates a INFO2Item object from a ctype.

Parameter:ctype (info2_item) – An info2_item object.
Return type:INFO2Item
Returns:The corresponding INFO2Item object.