diskutil

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicWritePrivateFile

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

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

func CreateDataDirectory(path string) error

func WritePrivateFile

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

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