Documentation
¶
Index ¶
- type File
- func (*File) AppendWriteFile(filePath string, body []byte) (writerLen int, err error)
- func (*File) CreateFile(filePath string, body []byte) (writerLen int64, err error)
- func (obj *File) CreateFileByNot(filePath string) error
- func (*File) FileSize(file string) int64
- func (*File) IsBinary(content string) bool
- func (*File) IsExist(path string) bool
- func (*File) ReadAll(fielPath string) ([]byte, error)
- func (*File) ReadAllOnLine(fielPath string, callBak func(row string) bool)
- func (*File) ReadOnLine(fielPath string, callBak func(row string) bool)
- func (File) WriteFileSafer(writePath string, data []byte, perm os.FileMode) error
- type Folder
- func (*Folder) IsDir(path string) bool
- func (*Folder) ReadDirs(dir string) ([]string, error)
- func (*Folder) ReadFiles(dir string) (fileList []os.FileInfo, err error)
- func (*Folder) ReadFilesByOrderNum(dir string) (fileList []string, err error)
- func (*Folder) ReadFilesToStr(dir string) (fileList []string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { }
func (*File) AppendWriteFile ¶
追加写入
func (*File) CreateFile ¶
覆盖写入文件
func (*File) CreateFileByNot ¶
如果文件夹不存在,则递归创建文件夹
func (*File) ReadAllOnLine ¶
一次性加载文件,按行读取
func (*File) ReadOnLine ¶
逐行读取文件
Click to show internal directories.
Click to hide internal directories.