Loading...
Searching...
No Matches
pyregfi.Hive Class Reference

Represents a single registry hive (file) More...

## Public Member Functions

| __init__ (self, fh)
| Constructor.
| subtree (self, path)
| Creates a HiveIterator initialized at the specified path in the hive.

## Static Public Attributes

| root = None
| The root Key of this Hive.
float | modified = 1300000000.123456
| This Hives's last modified time represented as the number of seconds since the UNIX epoch in UTC; similar to what time.time() returns.
int | sequence1 = 12345678
| First sequence number.
int | sequence2 = 12345678
| Second sequence number.
int | major_version = 1
| Major version.
int | minor_version = 5
| Minor version.

## Detailed Description

Represents a single registry hive (file)

## Constructor & Destructor Documentation

## __init__()

pyregfi.Hive.__init__ | ( |  | self,
|  |  | fh
| ) |  |

Constructor.

Initialize a new Hive based on a Python file object. To open a file by path, see openHive.

Parameters

  fh | A Python file object. The constructor first looks for a valid fileno attribute on this object and uses it if possible. Otherwise, the seek and read methods are used for file access.

Note
  Supplied file must be seekable. Do not perform any operation on the provided file object while a Hive is using it. Do not construct multiple Hive instances from the same file object. If a file must be accessed by separate code and pyregfi simultaneously, use a separate file descriptor. Hives are thread-safe, so multiple threads may use a single Hive object.

References pyregfi._StructureWrapper._base, pyregfi.Security._base, pyregfi.Key._base, pyregfi.Hive._fh, pyregfi.Hive.file, pyregfi.getLogMessages(), and pyregfi.Hive.raw_file.

## Member Function Documentation

## subtree()

pyregfi.Hive.subtree | ( |  | self,
|  |  | path
| ) |  |

Creates a HiveIterator initialized at the specified path in the hive.

Parameters

  path | A list of Key names which represent an absolute path within the Hive

Returns
  A HiveIterator which is positioned at the specified path.

Exceptions

  Exception | If the path could not be found/traversed

The documentation for this class was generated from the following file:

- __init__.py