Documentation ¶
Index ¶
- func Copy(srcPath, dstPath string) error
- func Exists(path string) bool
- func ForceCopy(srcPath, dstPath string) error
- func MakeDir(path string) error
- func Move(srcPath string, dstPath string) error
- func Read(path string) (string, error)
- func ReadYaml[T interface{}](path string, typ T) (*T, error)
- func Remove(path string) error
- func WriteYaml(obj interface{}, path string, perm fs.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
Copy gracefully copies a file from source to destination path. Files that already exist on the destination path will be left untouched.
func Exists ¶
Exists returns true if file metadata is obtained without errors. Otherwise, false is returned.
func ForceCopy ¶
ForceCopy copies a file from source to destination path. Files that already exist on the destination path will be replaced (overwritten).
func Move ¶
Move moves a file or directory to a specified location. First the destination file or directory is removed, and then the source content is moved.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.