file

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Atomic

type Atomic struct{}

Atomic exposes an interface to atomicly write config files to the filesystem

func (Atomic) Sync

func (a Atomic) Sync(data io.Reader, path string, perm os.FileMode) error

Sync atomicly writes data to a file at the given path with the given permissions

If the parent directory does not exit it is created If the file already exists and diff returns 0 then this command is a noopp Requires the diff utility to be present on the system, since it is specified in POSIX we assume it is

Jump to

Keyboard shortcuts

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