Documentation
¶
Overview ¶
Package atomicfile writes files that readers find whole, or not at all.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Restore ¶
Restore puts files back as they were, the last changed first: it writes back what they held, through temporary files named after pattern, and removes those that didn't exist. It returns what it couldn't put back.
func Write ¶
Write writes data to path through a temporary file of dir, named after pattern as os.CreateTemp names it, renamed into place: a reader finds the file whole, or not at all. A write that fails removes the temporary file. dir is on the file system of path, such as its directory. Others may read the file.
Types ¶
Click to show internal directories.
Click to hide internal directories.