dissect.apfs.objects.btree¶
Module Contents¶
Classes¶
APFS B-tree object. |
- class dissect.apfs.objects.btree.BTree(container: dissect.apfs.apfs.APFS, address: int, *, block: bytes | None = None, cipher: dissect.fve.crypto.Cipher | None = None)¶
Bases:
dissect.apfs.objects.base.ObjectAPFS B-tree object.
- __type__¶
- object: dissect.apfs.c_apfs.c_apfs.btree_node_phys¶
- container¶
- address¶
- root¶
- block¶
- cipher = None¶
- header¶
- info¶
- __repr__() str¶
- property flags: dissect.apfs.c_apfs.c_apfs.BTREE¶
The B-tree’s flags.
- search(key: bytes, *, exact: bool = False, cmp: collections.abc.Callable[[Any, bytes], Literal[-1, 0, 1]] = cmp_default, omap: dissect.apfs.objects.omap.ObjectMap | None = None, oid: int = 0, xid: int | None = None) bytes | None¶
Search for a key in the B-tree.
- Parameters:
key – Key to search for.
exact – If
True, only return if an exact match is found.cmp – Comparison function to use. Should return -1, 0, or 1.
omap – The object map to use for resolving virtual child objects.
oid – The base object ID to use for resolving virtual child objects.
xid – The transaction ID to use for resolving virtual child objects.