Documentation ¶
Overview ¶
Package fse provides additional filesystem functions which extend the capability of stdlib
Index ¶
- func DeleteDirIfEmpty(dir string) error
- func DeleteFileDirIfEmpty(fp string) error
- func EnsureDir(dir string) error
- func EnsureFileDir(fp string) error
- func EnsureWriteFile(filename string, data []byte, perm fs.FileMode) error
- func Exists(fp string) bool
- func Filename(fp string) string
- func FilenameWithExt(fp string) string
- func Sanitise(input string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDirIfEmpty ¶
DeleteDirIfEmpty deletes a directory if it's empty
func DeleteFileDirIfEmpty ¶
DeleteFileDirIfEmpty deletes the parent directory for a specified filepath if it's empty
func EnsureFileDir ¶
EnsureFileDir ensures the parent directory of the file exists on the filesystem
func EnsureWriteFile ¶
EnsureWriteFile performs os.WriteFile but ensures that all directories leading up to the file will be created
func FilenameWithExt ¶
FilenameWithExt returns a file's name with its extensions given its filepath
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.