Skip to main content

Module fs_util

Module fs_util 

Source

Structs§

FileLock
Advisory file lock using a .lock file. The lock is released when the FileLock is dropped.

Functions§

atomic_write
Atomic write: write content to a PID-suffixed temp file with chmod 600, then rename. Uses O_EXCL (create_new) to prevent symlink attacks on the temp file path. Cleans up the temp file on failure.