liblitho 0.2.0

cli tool to flash/clone the images to storage devices
Documentation
use crate::devices::DeviceError;
use crate::platform::traits::DevicePathOps;

use super::MacPlatform;

impl DevicePathOps for MacPlatform {
    fn validate_whole_disk_path(path: &str) -> Result<(), DeviceError> {
        let trimmed = path.trim();
        if trimmed.is_empty() {
            return Err(DeviceError::invalid_path("Device path is empty."));
        }
        if !(trimmed.starts_with("/dev/disk") || trimmed.starts_with("/dev/rdisk")) {
            return Err(DeviceError::invalid_path(format!(
                "Device must be a macOS disk path (e.g. /dev/disk2), got: {trimmed}"
            )));
        }
        Ok(())
    }

    fn paths_equivalent(listed: &str, selected: &str) -> bool {
        listed == selected
    }
}