Module file_io

Module file_io 

Source
Expand description

File I/O utilities with atomic writes

Provides safe file operations that won’t corrupt data on failure.

Functions§

json_file_valid
Check if a JSON file exists and is valid
read_json
Read JSON from a file, returning a default value if file doesn’t exist
read_json_required
Read JSON from a file, returning an error if file doesn’t exist
write_json_atomic
Write JSON to a file atomically (write to temp, then rename)