Skip to main content

detect

Function detect 

Source
pub fn detect<R: Read + Seek>(src: R) -> Result<Filesystem, DetectError>
Expand description

Detect the filesystem family at the start of an image.

Sugar for detect_with under the default DetectOptions. For a filesystem that begins somewhere other than the start of the source — a partition, or a region a carver located — name where with DetectOptions::base.

§Errors

Returns DetectError::Io when the source cannot be read, or DetectError::Unrecognized when no compiled-in family recognizes the image.