:py:mod:`dissect.volume.disk.partition` ======================================= .. py:module:: dissect.volume.disk.partition Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.volume.disk.partition.Partition Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: dissect.volume.disk.partition.translate_partition_type Attributes ~~~~~~~~~~ .. autoapisummary:: dissect.volume.disk.partition.PARTITION_TYPES .. py:data:: PARTITION_TYPES .. py:class:: Partition(disk: dissect.volume.disk.schemes.APM | dissect.volume.disk.schemes.BSD | dissect.volume.disk.schemes.GPT | dissect.volume.disk.schemes.MBR, number: int, offset: int, size: int, type: int | str | uuid.UUID, name: str | None = None, flags: int | None = None, guid: uuid.UUID | None = None, type_str: str | None = None, raw: dissect.cstruct.Structure = None) A partition on a disk. :param disk: The disk the partition is on. :param number: The partition number (1-indexed). :param offset: The offset of the partition in bytes. :param size: The size of the partition in bytes. :param type: The partition type. This is either an integer (MBR, BSD), a string (APM), or a UUID object (GPT). :param name: The partition name (if available). :param flags: The partition flags (if available). :param guid: The partition GUID (if available). :param type_str: The partition type as a string (if available). :param raw: The raw partition structure (if available). .. py:attribute:: disk .. py:attribute:: number .. py:attribute:: offset .. py:attribute:: size .. py:attribute:: type .. py:attribute:: name :value: None .. py:attribute:: flags :value: None .. py:attribute:: guid :value: None .. py:attribute:: type_str .. py:attribute:: type_name .. py:attribute:: raw :value: None .. py:method:: __repr__() -> str .. py:method:: open() -> BinaryIO Open a stream to the partition. .. py:function:: translate_partition_type(type: int | str | uuid.UUID, prepend_type: bool = True) -> str Translate a partition type to a human-readable format.