exfile

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndCreateDir

func CheckAndCreateDir(path string) error

CheckAndCreateDir check and create dir

func CheckAndCreateDirByMode

func CheckAndCreateDirByMode(path string, mode os.FileMode) error

CheckAndCreateDirByMode check and create dir

func CheckFileExists

func CheckFileExists(filename string) (bool, error)

CheckFileExists check file exist

func CheckFileExistsWithSuffix

func CheckFileExistsWithSuffix(pathDir, suffix string) bool

CheckFileExistsWithSuffix 指定目录是否含有指定后缀的文件

func DirIsEmpty

func DirIsEmpty(dir string) bool

DirIsEmpty 验证目录是否为空

func IsHaveFile

func IsHaveFile(path string) bool

IsHaveFile 指定目录是否含有文件 .开头文件除外

func ReadFileOneLine

func ReadFileOneLine(fileName string) string

ReadFileOneLine 读取文件一行

func RemoveFiles

func RemoveFiles(path string) bool

RemoveFiles 删除文件

func SearchFile

func SearchFile(pathDir, name string, level int) bool

SearchFile 搜索指定目录是否有指定文件,指定搜索目录层数,-1为全目录搜索

func SearchFileBody

func SearchFileBody(filename, searchStr string) bool

SearchFileBody 搜索文件中是否含有指定字符串

func WriteFile

func WriteFile(filePath string, content string) error

WriteFile 写文件

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL