Documentation
¶
Index ¶
- func CleanSpecial(path string) string
- func DirExists(dir string) (bool, error)
- func FileExists(file string) (bool, error)
- func IsDir(file string) (bool, error)
- func IsFile(file string) (bool, error)
- func Patch(file string, patch func(data []byte) ([]byte, error)) error
- func PatchJSON[T any](file string, patch func(v *T) error) error
- func PatchJSONPretty[T any](file string, patch func(v *T) error) error
- func ReadFile(file string) ([]byte, error)
- func RebaseAbsPath(root string, absPath string) string
- func RebasePath(root string, path string) string
- func Slashlize(path string) string
- func UpdateFile(path string, updateFunc func(content []byte) (bool, []byte, error)) error
- func WalkRelative(root string, h func(path string, relPath string, d fs.DirEntry) error) error
- func WriteFile(file string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanSpecial ¶ added in v1.0.26
func FileExists ¶ added in v1.0.37
func RebaseAbsPath ¶ added in v1.1.1
func RebasePath ¶ added in v1.1.1
when doing filepath.Join(a,b), on windows, if b has :, everything fails TODO: test on windows
func UpdateFile ¶ added in v1.1.0
func WalkRelative ¶ added in v1.0.37
WalkRelative: calculate relative path when walking
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.