gin-vue-admin 2.0代码重构
This commit is contained in:
14
server/utils/directory.go
Normal file
14
server/utils/directory.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package tools
|
||||
|
||||
import "os"
|
||||
|
||||
func PathExists(path string) (bool, error) {
|
||||
_, err := os.Stat(path)
|
||||
if err == nil {
|
||||
return true, nil
|
||||
}
|
||||
if os.IsNotExist(err) {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
}
|
Reference in New Issue
Block a user