Documentation ¶
Overview ¶
Package file 文件实用工具
Index ¶
- Variables
- func DownloadTo(url, file string) error
- func GetCustomLazyData(dataurl, path string) ([]byte, error)
- func GetLazyData(path, stor string, isDataMustEqual bool) (data []byte, err error)
- func IsExist(path string) bool
- func IsNotExist(path string) bool
- func Pwd() (path string)
- func Size(path string) (n int64)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyBody = errors.New("read body len <= 0") ErrInvalidPath = errors.New("invalid path") )
View Source
var BOTPATH = Pwd()
BOTPATH BOT当前路径
View Source
var ( // SkipOriginal 直接从镜像站获取数据 SkipOriginal = false )
Functions ¶
func GetCustomLazyData ¶
GetCustomLazyData 获取自定义懒加载数据, 不进行 md5 验证, 忽略 data/Abcde/ 路径. 传入的 path 的前缀 data/abcde/ 将被删去 以便进行下载, 但保存时仍位于 data/abcde/xxx
func GetLazyData ¶
GetLazyData 获取公用懒加载数据 传入的 path 的前缀 data/ 在验证完 md5 后将被删去 以便进行下载, 但保存时仍位于 data/Abcde/xxx
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.