files

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorFailedToSplitDataURL = errors.New("Failed to split data URL into 2 parts")
)

Functions

func AtomicWrite added in v0.20.0

func AtomicWrite(path string, data []byte) (err error)

AtomicWrite writes data to path via a temp file + fsync + rename so readers never see a partial file. Parent directories are created as needed. Modeled after tailscale.com/atomicfile.

func Copy added in v0.20.0

func Copy(src, dst string) error

Copy copies src to dst, creating parent directories as needed.

func Exists

func Exists(path string) (bool, error)

func IsEmpty added in v0.14.11

func IsEmpty(path string) (bool, error)

func WriteDataURLToFile added in v0.15.6

func WriteDataURLToFile(url string, destination string) (string, error)

func WriteFile added in v0.15.6

func WriteFile(output []byte, outputPath string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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