feat: torrent file support on web (#171)

This commit is contained in:
Levi authored and GitHub committed 2023-07-28 21:48:20 +08:00
1 parent 81518d794f
commit a5d8713ff7
12 files changed
+288 -55

No files matched your search

+10
View File
@@ -88,3 +88,13 @@ func CreateDirIfNotExist(dir string) error {
}
return nil
}
// IsExistsFile check file exists and is a file
func IsExistsFile(path string) bool {
info, err := os.Stat(path)
// 判断路径是否存在,并且是一个文件
if err == nil && !info.IsDir() {
return true
}
return false
}