mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-27 10:01:56 +08:00
Feat: Decide whether to do database migration based on version.lock
This commit is contained in:
13
pkg/util/io.go
Normal file
13
pkg/util/io.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package util
|
||||
|
||||
import "os"
|
||||
|
||||
// Exists reports whether the named file or directory exists.
|
||||
func Exists(name string) bool {
|
||||
if _, err := os.Stat(name); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user