Documentation ¶
Index ¶
- 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 Filesize(s int64) float64
- func Sanitise(input string) string
- func SortNatural(a, b string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
func Sanitise ¶
Sanitise cleans up an input filename to ensure it's save for saving to the filesystem
func SortNatural ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.