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 DirSize(path string) (uint64, 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 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 DirSize ¶
DirSize returns the size in bytes for all files in all directories under the given path
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.