diskutil

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 2 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicWriteFile

func AtomicWriteFile(path string, data []byte, mode os.FileMode) error

AtomicWriteFile writes data out. It writes to a temp file first, fsyncs that file, then swaps the file in. os.Rename is an atomic operation, so this sequence avoids having a partially written file at the final location. Finally, fsync is called on the directory to ensure the rename is persisted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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