Documentation
¶
Index ¶
- func CheckNotExist(src string) bool
- func CheckPermission(src string) bool
- func Copy(source string, dest string, fn func(path string, info os.FileInfo) bool) (err error)
- func CopyDir(source string, dest string) (err error)
- func CopyFile(source string, dest string) (err error)
- func FileExt(filePathName string) string
- func GetExt(fileName string) string
- func GetFileSize(path string) (i int64, err error)
- func GetImageName(name string) string
- func GetSize(r io.Reader) (i int, err error)
- func GrepFile(patten string, filename string) (lines []string, err error)
- func IsBinary(content string) bool
- func IsDir(path string) bool
- func IsExist(path string) bool
- func IsImg(extension string) bool
- func IsNotExistMkDir(src string) (err error)
- func MkDir(src string) (err error)
- func MustOpen(fileName, filePath string) (f *os.File, err error)
- func Open(name string, flag int, perm os.FileMode) (f *os.File, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPermission ¶
CheckPermission check if the file has permission
func GetFileSize ¶
GetFileSize get the length in bytes of file of the specified path.
func GrepFile ¶
GrepFile like command grep -E for example: GrepFile(`^hello`, "hello.txt") \n is striped while read
func IsNotExistMkDir ¶
IsNotExistMkDir create a directory if it does not exist
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.