Documentation ¶
Index ¶
- func DownloadWithDir(ctx context.Context, srcUrl string, targetDir string, ...) (err error)
- func DownloadWithDirAndName(ctx context.Context, srcUrl string, targetDir string, targetName string, ...) (err error)
- func DownloadWithPath(ctx context.Context, srcUrl string, targetPath string, ...) (err error)
- func Exists(name string) bool
- func IsDir(dir string) bool
- func PureName(name string) string
- func RecordData(recoder *Recorder, data interface{}) (err error)
- type Recorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadWithDir ¶
func DownloadWithDir(ctx context.Context, srcUrl string, targetDir string, funcs ...func(length, downloaded int64)) (err error)
将文件下载存储到指定目录
func DownloadWithDirAndName ¶
func DownloadWithDirAndName(ctx context.Context, srcUrl string, targetDir string, targetName string, funcs ...func(length, downloaded int64)) (err error)
下载文件
func DownloadWithPath ¶
func DownloadWithPath(ctx context.Context, srcUrl string, targetPath string, funcs ...func(length, downloaded int64)) (err error)
将文件下载存储到指定路径
func RecordData ¶ added in v0.0.6
写入已经json序列化好的字符数组,字符串或者是可以进行json序列化的对象
Types ¶
Click to show internal directories.
Click to hide internal directories.