Documentation ¶
Overview ¶
Package fileio provides high-level file operations.
Index ¶
- func CopyFiles(pattern string, dstDir string, perm fs.FileMode) error
- func Exists(path string) bool
- func JoinDir(dir string, name string) (string, error)
- func MkdirTemp(perm fs.FileMode) (string, error)
- func ReadJson[T any](path string) (T, error)
- func WriteFile(path, content string, perm fs.FileMode) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFiles ¶
CopyFile copies all files matching the pattern to the destination directory. Does not overwrite existing file.
func JoinDir ¶
JoinDir joins a directory path with a relative file path, making sure that the resulting path is still inside the directory. Returns an error otherwise.
func MkdirTemp ¶
MkdirTemp creates a new temporary directory with given permissions and returns the pathname of the new directory.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.