atomicfile

package
v1.80.3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: BSD-3-Clause Imports: 4 Imported by: 40

Documentation

Overview

Package atomicfile contains code related to writing to filesystems atomically.

This package should be considered internal; its API is not stable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteFile

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

WriteFile writes data to filename+some suffix, then renames it into filename. The perm argument is ignored on Windows, but if the target filename already exists then the target file's attributes and ACLs are preserved. If the target filename already exists but is not a regular file, WriteFile returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳