Documentation ¶
Index ¶
- type Gfops
- func (goFileOps Gfops) GetFilePathList(srcFilePath string, f func(filePathList []string)) (filePathList []string)
- func (goFileOps Gfops) MkAllDir(f func(dirPath string), DirPaths ...interface{})
- func (goFileOps Gfops) OpenFile(filepaths ...interface{}) (file *os.File)
- func (goFileOps Gfops) ReadFileData(f func(readerString string, fileName string, file *os.File), ...)
- func (goFileOps Gfops) TouchFile(f func(), DirPath string, fileNames ...interface{})
- func (goFileOps Gfops) WriteFileData(f func(writer *bufio.Writer), filePaths ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gfops ¶ added in v0.0.4
type Gfops struct { }
func NewGoFileOps ¶
func NewGoFileOps() (gfops Gfops)
func (Gfops) GetFilePathList ¶ added in v0.0.4
func (goFileOps Gfops) GetFilePathList(srcFilePath string, f func(filePathList []string)) (filePathList []string)
GetFilePathList 根据传入的路径获取文件夹下所有的文件路径(根路径),返回文件路径数组 测试功能,尚未完善
func (Gfops) ReadFileData ¶ added in v0.0.4
func (goFileOps Gfops) ReadFileData(f func(readerString string, fileName string, file *os.File), filePaths ...interface{})
ReadFileData 打开文件并读取文件内容(按行读取),未提供打印功能 readString:文件中一行的内容 fileName:文件名称
func (Gfops) WriteFileData ¶ added in v0.0.4
WriteFileData 向文件中写入内容,测试功能,以覆盖的方式写入,提供writer接口,具体写入内容在匿名函数中自定义
Click to show internal directories.
Click to hide internal directories.