mirror of
https://github.com/cloudreve/Cloudreve.git
synced 2026-11-17 22:58:07 +00:00
Feat: Decide whether to do database migration based on version.lock
This commit is contained in:
1 parent
c5493fd1f1
commit
e858cbe2cf
18 files changed
+127
-26
No files matched your search
@@ -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