Skip to main content

detect_format

Function detect_format 

Source
pub fn detect_format(path: &Path) -> Option<ArchiveFormat>
Expand description

Detects archive format by file extension (case-insensitive).

For .tar.gz, the function checks whether the filename ends with .tar.gz (case-insensitive) before falling through to single-extension matching. Returns None for unrecognised extensions. No magic-byte sniffing is performed.