Documentation
¶
Index ¶
- type Config
- type File
- func (f *File) CopyFile(src, dest string) error
- func (f *File) CreateDirFile(dirtPath, fileName, content string) bool
- func (f *File) CreateFile(filePath, content string) bool
- func (f *File) CreateMultiDir(dirtPath string) bool
- func (f *File) DeleteDir(dirPath string) bool
- func (f *File) DeleteDirFile(dirPath, fileName string) bool
- func (f *File) GetDirectorySize(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) 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) error
- func (f *File) Rename()
- func (f *File) ReplaceDirFilesName(dirPath string, oldStr, newStr string) error
- func (f *File) Size(path string) int64
- func (f *File) WriteCsv(filePath string, data [][]string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) CreateMultiDir ¶ added in v0.1.3
CreateMultiDir 调用os.MkdirAll递归创建文件夹
func (*File) DeleteDirFile ¶ added in v0.1.4
DeleteDirFile 删除指定目录中的指定文件
func (*File) GetDirectorySize ¶ added in v0.1.3
GetDirectorySize 文件夹占用磁盘大小
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) 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 替换指定目录下的文件名
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
remove_files_suffix
command
|
|
|
z01_csv
command
|
|
|
z02_cirectory
command
|
|
|
z03_download
command
|
|
|
z04_file
command
|
Click to show internal directories.
Click to hide internal directories.