fsx

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicWrite

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

AtomicWrite writes a file atomically: write to a temp file then rename to replace.

func Exists

func Exists(path string) (bool, error)

Exists reports whether the file or directory exists.

func ReadFileLimit

func ReadFileLimit(path string, max int64) ([]byte, error)

ReadFileLimit reads a file with a maximum byte limit; returns error if exceeded to avoid OOM.

func WriteFileMkdirAll

func WriteFileMkdirAll(path string, data []byte, perm fs.FileMode) error

WriteFileMkdirAll writes a file, creating parent directories if needed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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