Skip to main content

detect

Function detect 

Source
pub fn detect(header: &[u8], footer: &[u8]) -> ContainerFormat
Expand description

Sniff the container format from a disk image’s header (its first bytes, ideally ≥512) and footer (its last 512 bytes — VHD’s conectix cookie and DMG’s koly trailer live at the end of the file).

Returns ContainerFormat::Raw when no wrapper magic is present (a bare MBR/GPT/APM disk).