pub fn write_file_atomic(
path: &Utf8Path,
content: &str,
) -> Result<AtomicWriteResult>Expand description
Atomically write content to a file using temp file + fsync + rename
This implements FR-FS-001 through FR-FS-005:
- FR-FS-001: Write to temporary file first, fsync, then atomically rename
- FR-FS-002: Windows rename retry with bounded exponential backoff (≤ 250ms)
- FR-FS-003: Track
rename_retry_countin warnings - FR-FS-004: UTF-8 encoding with LF line endings
- FR-FS-005: Cross-filesystem fallback (copy→fsync→replace)