ralph/fsutil/mod.rs
1//! Purpose: Facade for filesystem utility helpers used across Ralph.
2//!
3//! Responsibilities:
4//! - Declare focused fsutil companion modules.
5//! - Re-export the stable filesystem utility API used by crate callers.
6//! - Keep fsutil regression coverage colocated with the fsutil module.
7//!
8//! Scope:
9//! - Thin facade only; filesystem helper behavior lives in sibling companion modules.
10//!
11//! Usage:
12//! - Used through `crate::fsutil::*` imports across queue, config, runtime, and integration code.
13//! - Keeps the existing `crate::fsutil` surface stable while implementation is split.
14//!
15//! Invariants/Assumptions:
16//! - Existing public and crate-internal fsutil imports remain valid without caller changes.
17//! - Companion modules stay private; the facade owns the stable surface.
18
19mod atomic;
20mod paths;
21mod safeguard;
22mod temp;
23
24#[cfg(test)]
25mod tests;
26
27pub use crate::constants::paths::RALPH_TEMP_PREFIX;
28pub use atomic::write_atomic;
29pub use paths::expand_tilde;
30pub use safeguard::{safeguard_text_dump, safeguard_text_dump_redacted};
31pub use temp::{
32 cleanup_default_temp_dirs, cleanup_stale_temp_dirs, cleanup_stale_temp_entries,
33 create_ralph_temp_dir, create_ralph_temp_file, ralph_temp_root,
34};
35
36pub(crate) use atomic::sync_dir_best_effort;