mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
dir.Exists() method (#564)
This commit is contained in:
parent
01585ae2a0
commit
0c9ada1ab0
@ -63,3 +63,11 @@ func MustExist(path string) {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func Exist(path string) bool {
|
||||
_, err := os.Stat(path)
|
||||
if err != nil && os.IsNotExist(err) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user