dissect.volume.disk¶
Subpackages¶
Submodules¶
Package Contents¶
Classes¶
- class dissect.volume.disk.Disk(fh: BinaryIO, sector_size: int = 512)¶
- fh¶
- sector_size = 512¶
- scheme: dissect.volume.disk.schemes.APM | dissect.volume.disk.schemes.GPT | dissect.volume.disk.schemes.MBR | dissect.volume.disk.schemes.BSD = None¶
- partitions: list[dissect.volume.disk.partition.Partition] = []¶
- property serial: int | None¶
- class dissect.volume.disk.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.
- Parameters:
disk – The disk the partition is on.
number – The partition number (1-indexed).
offset – The offset of the partition in bytes.
size – The size of the partition in bytes.
type – The partition type. This is either an integer (MBR, BSD), a string (APM), or a UUID object (GPT).
name – The partition name (if available).
flags – The partition flags (if available).
guid – The partition GUID (if available).
type_str – The partition type as a string (if available).
raw – The raw partition structure (if available).
- disk¶
- number¶
- offset¶
- size¶
- type¶
- name = None¶
- flags = None¶
- guid = None¶
- type_str = None¶
- raw = None¶
- __repr__() str¶
- open() BinaryIO¶
Open a stream to the partition.
- exception dissect.volume.disk.DiskError¶
Bases:
ErrorCommon base class for all non-exit exceptions.