@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user