atomicwrite

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package atomicwrite provides atomic file write operations via temp-file + rename. It lives outside build/asset/plugin to avoid import cycles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string, perm os.FileMode) error

CopyFile atomically copies src to dst via streaming (no full-file buffering). Parent directories are created as needed.

func WriteFile

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

WriteFile atomically writes data to path via a uniquely-named temp file in the same directory, then os.Rename over the target. Parent directories are created as needed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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