fileutil

package
v1.0.15 Latest Latest
Warning

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

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

Documentation

Overview

Package fileutil provides durable filesystem helpers shared by package main and internal/* packages (ADR-0003). It has no dependency on the rest of Culvert (stdlib only).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicWrite

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

AtomicWrite writes data to path atomically: it writes to a unique temp file in the same directory, chmods, fsyncs the file, renames over the target, and best-effort fsyncs the parent directory. A crash mid-write never leaves a partial or corrupt target file. Moved verbatim from package main's atomicWriteFile (ADR-0003); behaviour is unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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