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