Documentation
¶
Index ¶
- func CopyFile(src, dest string) bool
- func CreateDir(dirtPath string) bool
- func CreateDirFile(dirtPath, fileName, content string) bool
- func CreateFile(filePath, content string) bool
- func DeleteDir(dirPath string) bool
- func DeleteDirFile(dirPath, fileName string) bool
- func GetDirName(dirtPath string) string
- func GetDirSize(path string) (int64, error)
- func GetFileDir(absolutePath string) (fileDir string)
- func GetFileDirAndFileName(absolutePath string) (fileDir string, fileName string)
- func GetFileName(absolutePath string) (fileName string)
- func GetFileNameNoSuffix(absolutePath string) (fileName string)
- func GetFileSize(path string) int64
- func GetFileSuffix(absolutePath string) (suffix string)
- func HandleDirFile(dirPath string, handleFunc func(filePath string)) error
- func HandleDirFileWithIgnoreDirList(dirPath string, handleFunc func(filePath string), ignoreDirList []string) error
- func IsDir(dirPath string) bool
- func IsDirContainsFile(dirPath, fileName string) bool
- func IsExists(path string) bool
- func IsFile(path string) bool
- func ReadCsv(fileName string) (data [][]string, err error)
- func RemoveDirFilesSuffix(dirPath string) bool
- func ReplaceDirFilesName(dirPath string, oldStr, newStr string) bool
- func ReplaceDirName(dirPath string, oldStr, newStr string) bool
- func WriteCsv(filePath string, data [][]string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDirFile ¶ added in v1.0.8
CreateDirFile 在指定文件夹中创建文件
func DeleteDirFile ¶ added in v1.0.8
DeleteDirFile 删除指定目录中的指定文件
func GetDirName ¶ added in v1.1.1
GetDirName 获取文件夹名字 注意:此方法无法提取名字中带小数点的文件夹
func GetFileDir ¶ added in v1.1.0
GetFileDir 获取文件路径
func GetFileDirAndFileName ¶ added in v1.1.0
GetFileDirAndFileName 获取文件路径和文件名
func GetFileName ¶ added in v1.1.0
GetFileName 获取文件名称
func GetFileNameNoSuffix ¶ added in v1.1.0
GetFileNameNoSuffix 获取文件名称,不包含后缀
func GetFileSuffix ¶ added in v1.1.0
GetFileSuffix 获取文件后缀
func HandleDirFile ¶ added in v1.0.8
HandleDirFile 使用handleFunc处理文件夹中的每个文件
func HandleDirFileWithIgnoreDirList ¶ added in v1.0.9
func HandleDirFileWithIgnoreDirList(dirPath string, handleFunc func(filePath string), ignoreDirList []string) error
HandleDirFileWithIgnoreDirList 处理文件夹中的文件,并支持指定忽略的文件夹
func IsDirContainsFile ¶ added in v1.1.0
IsDirContainsFile 判断文件夹中是否包含指定文件
func RemoveDirFilesSuffix ¶ added in v1.1.0
RemoveDirFilesSuffix 去掉指定目录下所有文件的后缀
func ReplaceDirFilesName ¶ added in v1.1.0
ReplaceDirFilesName 替换指定目录下的文件名
func ReplaceDirName ¶ added in v1.1.0
ReplaceDirName 替换文件夹名
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.