mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-14 04:13:43 +00:00
feat: torrent file support on web (#171)
This commit is contained in:
12 files changed
+288
-55
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user