Documentation ¶
Index ¶
- func Copy(srcFile, dstFile string) error
- func CopyDirectory(scrDir, dest string) error
- func CopySymLink(source, dest string) error
- func CreateIfNotExists(dir string, perm os.FileMode) error
- func Exists(filePath string) bool
- func FileExists(filename string) bool
- func ReadFile(path string) ([]byte, error)
- func WriteFile(path string, data []byte) error
- func WriteJSON(path string, data interface{}) error
- func WriteText(path string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDirectory ¶ added in v0.16.1
CopyDirectory recursively copies a directory. From https://stackoverflow.com/questions/51779243/copy-a-folder-in-go
func CopySymLink ¶ added in v0.16.1
func CreateIfNotExists ¶ added in v0.16.1
func FileExists ¶ added in v0.14.0
func ReadFile ¶
ReadFile reads the file from path, if not found, it will print the absolute path, instead of relative path.
func WriteFile ¶ added in v0.15.0
WriteFile writes a byte array to the file at the given path. This method will also create the directory and file as needed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.