Documentation
¶
Overview ¶
Package fsutil provides utility functions for working with the filesystem.
Index ¶
- func CopyDir(src, dst string) error
- func CopyFile(src, dest string) error
- func CopyFiles(srcDestTuples ...[2]string) error
- func EnsureDir(path string) error
- func EnsureDirs(paths ...string) error
- func FromGob[T any](file fs.File) (T, error)
- func FromGobInto(file fs.File, destPtr any) error
- func GetCallerDir() string
- func MustReadFile(f fs.FS, name string) []byte
- func MustSub(f fs.FS, dirElems ...string) fs.FS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFiles ¶
CopyFiles takes any number of src-dest tuples and copies each file from src to dest.
func EnsureDirs ¶
func FromGobInto ¶
FromGobInto decodes a gob-encoded file into a destination. The destination must be a pointer to the destination type.
func GetCallerDir ¶
func GetCallerDir() string
GetCallerDir returns the directory of the calling function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.