fileutil

package
v1.0.37 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanSpecial added in v1.0.26

func CleanSpecial(path string) string

func DirExists added in v1.0.37

func DirExists(dir string) (bool, error)

func FileExists added in v1.0.37

func FileExists(file string) (bool, error)

func IsDir added in v1.0.37

func IsDir(file string) (bool, error)

func IsFile added in v1.0.37

func IsFile(file string) (bool, error)

func Patch

func Patch(file string, patch func(data []byte) ([]byte, error)) error

func PatchJSON

func PatchJSON[T any](file string, patch func(v *T) error) error

func PatchJSONPretty

func PatchJSONPretty[T any](file string, patch func(v *T) error) error

func WalkRelative added in v1.0.37

func WalkRelative(root string, h func(path string, relPath string, d fs.DirEntry) error) error

WalkRelative: calculate relative path when walking

Types

This section is empty.

Jump to

Keyboard shortcuts

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