Expand description
Cross-platform atomic file write: tempfile in same dir → fsync → persist → parent dir fsync. POSIX durability + Windows MoveFileEx semantics.
Functions§
- atomic_
write - Atomically write
contenttopath. Uses a temp file in the same parent directory (avoids EXDEV on iCloud/Dropbox symlinks), fsyncs the file before persist, then fsyncs the parent directory for POSIX durability.