Skip to main content

Module fs

Module fs 

Source
Expand description

Filesystem helpers shared by the install pipeline.

extract_archive and find_fomod_config used to live in modde-cli/src/commands/install.rs. They are hoisted here so both the CLI and the UI install paths share a single implementation, and so the installer crate can probe extracted archives directly without reaching back into CLI code.

Functions§

extract_archive
Extract a zip archive into dest. Refuses entries whose paths would escape dest (e.g. ../../etc/passwd) — zip’s enclosed_name guard.
find_fomod_config
Locate a FOMOD ModuleConfig.xml under mod_dir, trying the canonical path first and then falling back to case-insensitive matching for archives built on case-sensitive filesystems.
xxh64_file_hex
Hash a file with xxh64, returning the hex digest. Used to populate InstallPlan::source_archive_hash on download.