Skip to main content

build_filesystem

Function build_filesystem 

Source
pub fn build_filesystem<R: Read + Seek + Send + 'static>(
    reader: R,
    fs_type: FsType,
    name: &str,
) -> Result<Box<dyn ForensicFs + Send>>
Expand description

Construct a ForensicFs from a seekable byte source and a detected type.

This is the single dispatch point shared by the CLI’s outer mount path and its container (EWF/VMDK) inner-filesystem path, so a new format is wired in exactly once. name is used only to label the single file of a raw (FsType::Unknown) mount.

Archives (zip/7z/tar.gz) and filesystems (ext4/ntfs/exfat/ hfsplus/iso/apfs) all build from the same Read + Seek reader. Container types (Ewf/Vmdk) are opened by the caller, not here.

§Errors

Returns the parse error (as InvalidData) if the source does not match the claimed type, or Unsupported for APFS / a feature that was not compiled in.