mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
dir.Recreate() (#580)
This commit is contained in:
parent
c96a22dcdc
commit
8ed848acbc
@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
|
||||
@ -71,3 +72,11 @@ func Exist(path string) bool {
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func Recreate(dir string) {
|
||||
aggDir := path.Join(dir, "agg22")
|
||||
if Exist(aggDir) {
|
||||
_ = os.RemoveAll(aggDir)
|
||||
}
|
||||
MustExist(aggDir)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user