Skip to main content

Module fsutil

Module fsutil 

Source
Expand description

Purpose: Facade for filesystem utility helpers used across Ralph.

Responsibilities:

  • Declare focused fsutil companion modules.
  • Re-export the stable filesystem utility API used by crate callers.
  • Keep fsutil regression coverage colocated with the fsutil module.

Scope:

  • Thin facade only; filesystem helper behavior lives in sibling companion modules.

Usage:

  • Used through crate::fsutil::* imports across queue, config, runtime, and integration code.
  • Keeps the existing crate::fsutil surface stable while implementation is split.

Invariants/Assumptions:

  • Existing public and crate-internal fsutil imports remain valid without caller changes.
  • Companion modules stay private; the facade owns the stable surface.

Re-exports§

pub use crate::constants::paths::RALPH_TEMP_PREFIX;

Functions§

cleanup_default_temp_dirs
cleanup_stale_temp_dirs
cleanup_stale_temp_entries
create_ralph_temp_dir
create_ralph_temp_file
Creates a NamedTempFile in the ralph temp directory with the ralph_ prefix. This ensures the file will be caught by cleanup_default_temp_dirs().
expand_tilde
Expands a leading ~ to the user’s home directory ($HOME) for Unix-style paths.
ralph_temp_root
safeguard_text_dump
Writes a safeguard dump with raw (non-redacted) content.
safeguard_text_dump_redacted
Writes a safeguard dump with redaction applied to sensitive content.
write_atomic