StorageMiner node type

This commit is contained in:
Łukasz Magiera
2019-07-24 01:47:36 +02:00
parent 486598ef53
commit fe147ce90d
2 changed files with 71 additions and 31 deletions
+5
View File
@@ -58,6 +58,11 @@ func NewFS(path string) (*FsRepo, error) {
}, nil
}
func (fsr *FsRepo) Exists() bool {
_, err := os.Stat(fsr.path)
return err == nil
}
func (fsr *FsRepo) Init() error {
if _, err := os.Stat(fsr.path); err == nil {
return fsr.initKeystore()