fsatomic

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package fsatomic provides crash-safe atomic file writes shared by the file-backed adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteFile

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

WriteFile atomically writes data to path with the given permissions. It writes to a temporary file in the same directory, fsyncs it, renames it into place, then best-effort fsyncs the parent directory so the rename survives a crash. The parent directory is created with 0o700 if it does not exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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