Documentation ¶
Index ¶
- type IOUtils
- func (i *IOUtils) CopyDir(src string, dest string) error
- func (i *IOUtils) CopyFile(src string, dst string) error
- func (i *IOUtils) CopyFileFromReader(srcFile io.Reader, dst string) error
- func (i *IOUtils) GetRuntimePath(filename string) string
- func (i *IOUtils) JsonFileToStruct(jsonSrc string, obj interface{}) error
- func (i *IOUtils) PathExists(path string) bool
- func (i *IOUtils) ReplaceStrToFile(content, path string) error
- func (i *IOUtils) StructToJsonFile(jsonSrc string, obj interface{}) error
- type StringUtils
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IOUtils ¶
type IOUtils struct { }
func (*IOUtils) CopyFileFromReader ¶
通过Reader复制文件
func (*IOUtils) JsonFileToStruct ¶
将本地的JSON文件读取并转换成指定的结构体
func (*IOUtils) ReplaceStrToFile ¶
将内容覆盖到指定文件,如果文件不存在那么创建,如果文件存在那么覆盖
func (*IOUtils) StructToJsonFile ¶
将结构体序列化成JSON并保存到文件
type StringUtils ¶
type StringUtils struct { }
func String ¶
func String() *StringUtils
func (*StringUtils) GetFileSuffixName ¶
func (i *StringUtils) GetFileSuffixName(fileName string) (error, string)
获取文件的后缀名
Click to show internal directories.
Click to hide internal directories.