Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtomicWrite ¶
AtomicWrite writes data to path via a temporary file + rename for crash safety. The perm argument sets the final file permissions (e.g. 0644 for docs, 0755 for hooks).
func AtomicWriteExclusive ¶
AtomicWriteExclusive writes data to path via a temporary file + hard link. Unlike AtomicWrite, it fails if path already exists (returns an error where os.IsExist reports true). This avoids the TOCTOU race inherent in Stat-then-Rename patterns.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.