Documentation
¶
Overview ¶
Package fileutil provides file I/O utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteFileAtomic ¶
WriteFileAtomic writes data to destPath atomically using a temp-file + fsync + rename pattern. If destPath already exists, its permissions are preserved; otherwise perm is used.
The temp file is created in the same directory as destPath so that the final os.Rename is guaranteed to be atomic on POSIX filesystems.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.