atomicfile

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteFile

func WriteFile(filename string, r io.Reader, mode os.FileMode) (err error)

WriteFile atomically writes the contents of r to the specified filepath with the given mode. This is a copy of https://github.com/natefinch/atomic/blob/master/atomic.go with minor modifications allowing to set mode of the written file. If the file already exists, its mode is preserved.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL