fileutil

package
v0.0.0-...-0bb8be8 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDirPerm  fs.FileMode = 0o755
	PrivateDirPerm  fs.FileMode = 0o700
	DefaultFilePerm fs.FileMode = 0o644
	PrivateFilePerm fs.FileMode = 0o600
	ExecutablePerm  fs.FileMode = 0o111
)

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(source, target string) (err error)

func WriteExecutable

func WriteExecutable(path string, data []byte) error

func WriteFile

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

func WriteJSONIfChanged

func WriteJSONIfChanged(path string, value any, perm fs.FileMode) (bool, error)

func WriteReader

func WriteReader(path string, reader io.Reader, perm fs.FileMode) error

func WriteTextIfChanged

func WriteTextIfChanged(path, text string) (bool, error)

func WriteWith

func WriteWith(path string, perm fs.FileMode, write func(io.Writer) error) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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