storage

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicWrite

func AtomicWrite(filePath string, data []byte) error

AtomicWrite writes data to a file atomically by writing to a temporary file first

func EnsureDir

func EnsureDir(dir string) error

EnsureDir creates a directory if it doesn't exist

func FileExists

func FileExists(filePath string) bool

FileExists checks if a file exists

func GetFileSize

func GetFileSize(filePath string) (int64, error)

GetFileSize returns the size of a file in bytes

func IsValidJSON

func IsValidJSON(filePath string) error

IsValidJSON checks if a file contains valid JSON

func SafeCopy

func SafeCopy(src, dst string) error

SafeCopy copies a file with validation

Types

This section is empty.

Jump to

Keyboard shortcuts

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