Module atomic_file

Source
Expand description

Atomic file operations to prevent corruption during writes

Functionsยง

write_bytes
Write binary data to a file atomically with file locking
write_json
Write JSON data to a file atomically using a temporary file + rename strategy with file locking
write_string
Write string content to a file atomically using a temporary file + rename strategy with file locking