Skip to main content

Module device

Module device 

Source
Expand description

NTFS volume discovery via diskutil list -plist + mount.

diskutil list -plist emits a nested plist document whose top-level is a dict with an AllDisksAndPartitions array. Each entry is a whole-disk record containing a nested Partitions array. Partitions carry only Content, DeviceIdentifier, DiskUUID, and Size — no mount point or volume name. Those are recovered by cross-referencing the mount command output, which is cheap (one subprocess) and avoids N+1 diskutil info calls.

Structs§

Volume
A discovered NTFS volume/partition.

Functions§

enrich_with_mounts
Fill in mounted, mount_point, and volume_name on each volume using the device→mount-point map produced by parse_mount_output.
list_volumes
List all NTFS volumes visible to macOS.
parse_diskutil_plist
Parse the plist output of diskutil list -plist.
parse_mount_output
Parse the output of the mount command into a map of device identifier → mount point.
pretty_size
Format a byte count as 1.2 GiB.