Documentation
¶
Overview ¶
Package fsutil holds small filesystem helpers shared across ccl.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireFileLock ¶ added in v1.5.21
AcquireFileLock holds an exclusive advisory lock until the returned release function is called. The stable lock file must not be removed: atomic data replacement and process crashes must not create a second lock inode.
func TryFileLock ¶ added in v1.5.21
TryFileLock is AcquireFileLock without waiting: ok is false, with a nil release, while another holder has the lock.
func WriteFileAtomic ¶
WriteFileAtomic replaces path with data so readers see either the old or the new content, never a partial file: it writes a temporary file in the same directory with mode, syncs it, and renames it over path. The temporary file is removed on any failure.
Types ¶
This section is empty.