//! Filesystem helpers shared across the binary.
//!
//! Right now it's just `atomic_write` — staging to `<dest>.tmp` and
//! renaming over. Used both by `gogh::sync` (catalog index) and by the
//! TUI's two-phase apply (per-palette writes) so a disk-full or signal
//! in the middle never leaves a half-written file behind.
use ;
use fs;
use Path;
/// Write `content` to `dest` atomically: stages into `<dest>.tmp` and
/// renames over. Avoids leaving a half-written file when the write is
/// interrupted (disk full, signal, etc.).