fsatomic

package
v0.10.257 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package fsatomic provides atomic file writes and JSON file IO.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadJSON

func ReadJSON(path string, v any) error

ReadJSON reads path and unmarshals its JSON contents into v.

func WriteFileAtomic

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

WriteFileAtomic writes data to a sibling temporary file before replacing path.

func WriteJSON

func WriteJSON(path string, v any) error

WriteJSON marshals v and writes it atomically with private permissions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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