Help us shape the future of Go! Take the 2026 Go Developer Survey

diskutil

package
v1.14.9 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicWritePrivateFile added in v1.5.3

func AtomicWritePrivateFile(path string, data []byte) error

AtomicWritePrivateFile writes data out to a private file. It writes to a temp file first, fsyncs that file, then swaps the file in. It renames the file using MoveFileEx with 'MOVEFILE_WRITE_THROUGH', which waits until the file is synced to disk.

func AtomicWritePubliclyReadableFile added in v1.5.3

func AtomicWritePubliclyReadableFile(path string, data []byte) error

AtomicWritePubliclyReadableFile writes data out to a publicly readable file. It writes to a temp file first, fsyncs that file, then swaps the file in. It renames the file using MoveFileEx with 'MOVEFILE_WRITE_THROUGH', which waits until the file is synced to disk.

func CreateDataDirectory added in v1.4.0

func CreateDataDirectory(path string) error

func WritePrivateFile added in v1.5.3

func WritePrivateFile(path string, data []byte) error

WritePrivateFile writes data out to a private file. The file is created if it does not exist. If exists, it's overwritten.

func WritePubliclyReadableFile added in v1.5.3

func WritePubliclyReadableFile(path string, data []byte) error

WritePubliclyReadableFile writes data out to a publicly readable file. The file is created if it does not exist. If exists, it's overwritten.

Types

This section is empty.

Jump to

Keyboard shortcuts

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