Documentation
¶
Index ¶
- Constants
- func Alarm(words ...string)
- func CheckExactTime(timeStr string)
- func CheckHour(hour string)
- func Chown(dir string, uid, gid int)
- func CopyDir(src string, dst string) error
- func CopyFile(src, dst string) error
- func CountFiles(dirPath string) (int, error)
- func ExecCommand(c *exec.Cmd) (e error)
- func ExecTdlCommand(proxy, uri, target string) (e error)
- func FindLatestFileGo(dir string) string
- func FindUniqueFile(dir string, searchStr string) (string, error)
- func GenerateURL(baseURL string, offset int, tag string) error
- func GetAllFileInfoFast(dir, pattern string) ([]string, error)
- func GetExpectedFilesToAdd(urls []string) int
- func GetKey(s string) string
- func GetPercentageSign(s string) int
- func IsExistCmd(cmds ...string) bool
- func IsExistFile(filePath string) bool
- func IsExistPath(folderPath string) bool
- func ReadByLine(fp string) []string
- func ReadInSlice(fp string) []string
- func RenameByKey(of constant.OneFile, p constant.Parameter)
- func SetLog(l string)
- func TimeoutAlert(msg string)
- func WriteByLine(fp string, s []string) error
Constants ¶
View Source
const (
TdlLocation = "tdl"
)
Variables ¶
This section is empty.
Functions ¶
func CheckExactTime ¶ added in v0.1.0
func CheckExactTime(timeStr string)
CheckExactTime 检查是否到达指定的具体时间点 timeStr: 指定的时间字符串,格式为 "HH:MM:SS",例如 "08:30:00"
func CheckHour ¶ added in v0.1.0
func CheckHour(hour string)
CheckHour 检查当前时间是否到达指定小时 hour: 指定的小时数(24小时制) 当到达指定小时时返回 true
func CountFiles ¶ added in v0.1.0
统计指定目录下的文件数 相当于find . -type f | wc -l
func FindLatestFileGo ¶ added in v0.0.30
FindLatestFileGo 使用 Go 标准库在指定目录中查找最近创建或修改的文件 dir: 要搜索的目录路径 returns: 最新文件的绝对路径,如果出错则返回空字符串
func FindUniqueFile ¶ added in v0.0.4
func GetAllFileInfoFast ¶
func GetExpectedFilesToAdd ¶ added in v0.1.0
获取字符串数组理论上需要下载的条目数
func GetPercentageSign ¶
func IsExistCmd ¶
func ReadByLine ¶
func ReadInSlice ¶
func TimeoutAlert ¶ added in v0.1.0
func TimeoutAlert(msg string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.