Documentation ¶
Index ¶
- func CopyFile(src, des string) (w int64, err error)
- func Exist(filename string) bool
- func ExistDir(filePath string) bool
- func ExistFile(filename string) bool
- func GetCfgName() string
- func GetFileNameWithoutExtension(path string) string
- func GrepFile(patten string, filename string) (lines []string, err error)
- func IsSamePath(srcPath, dstPath string) bool
- func ListDir(dirPth string, suffix ...string) ([]string, error)
- func ReadFile(path string) (body []byte, err error)
- func SearchFile(filename string, paths ...string) (fullpath string, err error)
- func SelfDir() string
- func SelfPath() string
- func WalkDir(dirPth string, suffix ...string) (files []string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GrepFile ¶
GrepFile like command grep -E for example: GrepFile(`^hello`, "hello.txt") \n is striped while read
func SearchFile ¶
SearchFile Search a file in paths. this is often used in search config file in /etc ~/
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.