Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteFileAtomic ¶
func WriteFileAtomicFunc ¶
func WriteFileAtomicFunc(p, baseDir, tmpDir string, perm os.FileMode, persist bool, writeFunc func(f io.Writer) error) error
WriteFileAtomicFunc atomically writes a file, it achieves this by creating a temporary file and then moving it. writeFunc is the func that will write data to the file. TODO(sgotti) remove left over tmp files if process crashes before calling os.Remove
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.