Documentation
¶
Index ¶
- func BaseName(path string) string
- func Copy(src, dst string) error
- func FileExists(path string) bool
- func IsDir(path string) bool
- func LoadJSON(path string, data interface{}) error
- func LoadYAML(path string, data interface{}) error
- func MoveFile(src, dst string) (err error)
- func SanitizeName(name string) string
- func SaveJSON(path string, data interface{}, format bool) error
- func SaveYAML(path string, data interface{}) error
- func Split(path string) []string
- func TrimExtension(path string) string
- func UnsanitizeName(name string) string
- func Walk(fs http.FileSystem, root string, walkFn filepath.WalkFunc) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
FileExists returns true if the path points to a regular file.
func MoveFile ¶
MoveFile moves a file in the file system or across volumes, using rename if possible, but falling back to copying the file if not. This will error if either src or dst are not regular files.
func SanitizeName ¶
SanitizeName sanitizes a file name by replacing invalid characters.
func TrimExtension ¶
TrimExtension trims any extension from the path.
func UnsanitizeName ¶
UnsanitizeName reverses the effects of a call to SanitizeName.
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.