Documentation ¶
Overview ¶
Package fileutil implements some basic functions for file operations
Index ¶
- func ClearFile(path string) error
- func CopyFile(srcFilePath string, dstFilePath string) error
- func CreateDir(absPath string) error
- func CreateFile(path string) bool
- func FileMode(path string) (fs.FileMode, error)
- func IsDir(path string) bool
- func IsExist(path string) bool
- func IsLink(path string) bool
- func ListFileNames(path string) ([]string, error)
- func MiMeType(file any) string
- func ReadFileByLine(path string) ([]string, error)
- func ReadFileToString(path string) (string, error)
- func RemoveFile(path string) error
- func UnZip(zipFile string, destPath string) error
- func Zip(fpath string, destPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDir ¶ added in v2.0.9
CreateDir create directory in absolute path. param `absPath` like /a/, /a/b/
func ListFileNames ¶
ListFileNames return all file names in the path
func ReadFileByLine ¶
ReadFileByLine read file line by line
func ReadFileToString ¶
ReadFileToString return string of file content
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.