Documentation
¶
Overview ¶
Package fileutil provides shared filesystem helpers for AGH components.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidPath = errors.New("fileutil: invalid path")
ErrInvalidPath reports a path that cannot be represented safely by the filesystem boundary.
Functions ¶
func AtomicRemoveFile ¶
AtomicRemoveFile removes a file and syncs its parent directory.
func AtomicWrite ¶
AtomicWrite writes content with the default AGH file permissions via temp-file-and-rename.
func AtomicWriteFile ¶
AtomicWriteFile writes content to path via a temp file plus atomic replacement. It always syncs the temp file before replacement. Parent-directory metadata durability remains best-effort on platforms without directory fsync support.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.