:py:mod:`dissect.apfs.objects.btree` ==================================== .. py:module:: dissect.apfs.objects.btree Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.apfs.objects.btree.BTree .. py:class:: BTree(container: dissect.apfs.apfs.APFS, address: int, *, block: bytes | None = None, cipher: dissect.fve.crypto.Cipher | None = None) Bases: :py:obj:`dissect.apfs.objects.base.Object` APFS B-tree object. .. py:attribute:: __type__ .. py:attribute:: object :type: dissect.apfs.c_apfs.c_apfs.btree_node_phys .. py:attribute:: container .. py:attribute:: address .. py:attribute:: root .. py:attribute:: block .. py:attribute:: cipher :value: None .. py:attribute:: header .. py:attribute:: info .. py:method:: __repr__() -> str .. py:property:: flags :type: dissect.apfs.c_apfs.c_apfs.BTREE The B-tree's flags. .. py:method:: 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. :param key: Key to search for. :param exact: If ``True``, only return if an exact match is found. :param cmp: Comparison function to use. Should return -1, 0, or 1. :param omap: The object map to use for resolving virtual child objects. :param oid: The base object ID to use for resolving virtual child objects. :param xid: The transaction ID to use for resolving virtual child objects.