Expand description
Small filesystem helpers for atomic, permission-restricted writes.
The main entry point is write_atomic_restricted. It is used by
crate::creds_store (file-backed credential store) and by
Config::save, both of which write into ~/.harmont/
(see config::user_config_dir).
Functionsยง
- remove_
if_ exists - Remove a file if it exists; silently return
Ok(())if it does not. - write_
atomic_ restricted - Write
contentstopathatomically withfile_mode, ensuring the parent directory exists and is set todir_mode.