Expand description
Restricted directory/file creation (0o700 dirs, 0o600 files on Unix).
Prefer atomic_write_0600 / ensure_dir_0700 over bare fs::write for
anything that may hold secrets or session metadata.
Functions§
- atomic_
write_ 0600 - Atomically write bytes to
pathwith mode0o600(create temp with mode, then rename). - ensure_
dir_ 0700 - Ensure
direxists with mode0o700on Unix.