fsutil

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SyncDir added in v0.16.0

func SyncDir(dir string) error

SyncDir fsyncs a directory so renames inside it survive a crash. Callers that publish content with rename rather than WriteFileAtomic use it to make the swap durable before recording state that depends on it.

func WriteFileAtomic

func WriteFileAtomic(path string, data []byte, perm os.FileMode) error

WriteFileAtomic writes data to path using a temp file and atomic rename. perm sets the file mode applied to the final file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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