This commit is contained in:
2025-06-04 15:47:59 +08:00
parent 5bd7fdfe44
commit a9633ebd60
6 changed files with 170 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
package models
import "os"
// 判断文件是否存在
func File_exists(path string) bool {
_, err := os.Stat(path)
if err != nil {
return !os.IsNotExist(err)
}
return true
}