Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtomicWriteFile ¶ added in v0.2.0
AtomicWriteFile writes data to dest atomically: it writes to a temp file in the same directory, applies perm, then renames onto dest via ReplaceFile. The temp file is removed on every error path. Use for files that other processes or goroutines may read concurrently (config, caches).
func ReplaceFile ¶
ReplaceFile renames tmp onto dest, falling back to a copy when the rename fails — Windows encryption-software filter drivers report a cross-device link (EXDEV) for a same-dir rename. The rename error surfaces only if the copy also fails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.