Documentation ¶
Overview ¶
Package helpers implements utility routines for working with the filesystem.
Index ¶
- func CopyDirectoryContent(src string, dst string) error
- func CopyFile(src string, dst string) error
- func Exists(path string) (bool, error)
- func IsDir(path string) (bool, error)
- func IsEmpty(path string) (bool, error)
- func IsFile(path string) (bool, error)
- func IsInt(i any) bool
- func IsString(i any) bool
- func RemoveDirectoryContent(dir string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDirectoryContent ¶
CopyDirectoryContent copies the content of the src directory to the dst directory. Returns an error if src does not exist, or if src is not a directory.
func CopyFile ¶
CopyFile copies a file from src to dst, overwriting an existing file if present. Returns an error if src does not exist, or if src is a directory.
func IsEmpty ¶
IsEmpty reports if the given file or directory is empty, returning an error if path does not exist.
func IsFile ¶
IsFile reports whether path is a regular file, returning an error if path does not exist.
func RemoveDirectoryContent ¶
RemoveDirectoryContent removes all content from dir, preserving the directory itself. Returns an error if dir does not exist, or if dir is not a directory.
Types ¶
This section is empty.