diskutil

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 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.

func CreateDataDirectory added in v1.4.0

func CreateDataDirectory(path string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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