Documentation
¶
Index ¶
- func CreateDir(dirtPath string) bool
- func CreateDirFile(dirtPath, fileName, content string) bool
- func DeleteDir(dirPath string) bool
- func DeleteDirFile(dirPath, fileName string) bool
- func HandleDirFile(dirPath string, handleFunc func(filePath string)) error
- func HandleDirFileWithIgnoreDirList(dirPath string, handleFunc func(filePath string), ignoreDirList []string) error
- func IsExists(path string) bool
- type Config
- type File
- func (f *File) CopyFile(src, dest string) bool
- func (f *File) CreateDir(dirtPath string) bool
- func (f *File) CreateDirFile(dirtPath, fileName, content string) bool
- func (f *File) CreateFile(filePath, content string) bool
- func (f *File) DeleteDir(dirPath string) bool
- func (f *File) DeleteDirFile(dirPath, fileName string) bool
- func (f *File) GetDirSize(path string) (int64, error)
- func (f *File) GetFileDir(absolutePath string) (fileDir string)
- func (f *File) GetFileDirAndFileName(absolutePath string) (fileDir string, fileName string)
- func (f *File) GetFileName(absolutePath string) (fileName string)
- func (f *File) GetFileNameNoSuffix(absolutePath string) (fileName string)
- func (f *File) GetFileSize(path string) int64
- func (f *File) GetFileSuffix(absolutePath string) (suffix string)
- func (f *File) IsDir(dirPath string) bool
- func (f *File) IsDirContainsFile(dirPath, fileName string) bool
- func (f *File) IsExists(path string) bool
- func (f *File) IsFile(path string) bool
- func (f *File) ReadCsv(fileName string) (data [][]string, err error)
- func (f *File) RemoveDirFilesSuffix(dirPath string) bool
- func (f *File) ReplaceDirFilesName(dirPath string, oldStr, newStr string) bool
- func (f *File) ReplaceDirName(dirPath string, oldStr, newStr string) bool
- func (f *File) 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 HandleDirFile ¶ added in v1.0.8
HandleDirFile 使用handleFunc处理文件夹中的每个文件
Types ¶
type File ¶
File 文件对象
func NewWithConfig ¶ added in v0.1.4
NewWithConfig 使用配置创建File对象
func (*File) CreateDirFile ¶ added in v0.1.4
CreateDirFile 在指定文件夹中创建文件
func (*File) CreateFile ¶ added in v0.1.4
CreateFile 创建文件
func (*File) DeleteDirFile ¶ added in v0.1.4
DeleteDirFile 删除指定目录中的指定文件
func (*File) GetDirSize ¶ added in v1.0.4
GetDirSize 文件夹占用磁盘大小
func (*File) GetFileDir ¶ added in v0.1.4
GetFileDir 获取文件路径
func (*File) GetFileDirAndFileName ¶ added in v0.1.4
GetFileDirAndFileName 获取文件路径和文件名
func (*File) GetFileName ¶ added in v0.1.4
GetFileName 获取文件名称
func (*File) GetFileNameNoSuffix ¶ added in v1.0.5
GetFileNameNoSuffix 获取文件名称,不包含后缀
func (*File) GetFileSize ¶ added in v1.0.4
GetFileSize 获取文件大小
func (*File) GetFileSuffix ¶ added in v0.1.4
GetFileSuffix 获取文件后缀
func (*File) IsDirContainsFile ¶ added in v0.1.4
IsDirContainsFile 判断文件夹中是否包含指定文件
func (*File) RemoveDirFilesSuffix ¶ added in v0.1.3
RemoveDirFilesSuffix 去掉指定目录下所有文件的后缀
func (*File) ReplaceDirFilesName ¶ added in v0.1.3
ReplaceDirFilesName 替换指定目录下的文件名
func (*File) ReplaceDirName ¶ added in v1.0.7
ReplaceDirName 替换文件夹名
Source Files
¶
Click to show internal directories.
Click to hide internal directories.