forked from TrueCloudLab/frostfs-node
b9a2055e1c
This check should occur on the shard level, but because blobstor components expose `Open(readOnly bool)` interface, it is reasonable to expect an error here. Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
19 lines
378 B
Go
19 lines
378 B
Go
package fstree
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neofs-node/pkg/util"
|
|
)
|
|
|
|
// Open implements common.Storage.
|
|
func (t *FSTree) Open(ro bool) error {
|
|
t.readOnly = ro
|
|
return nil
|
|
}
|
|
|
|
// Init implements common.Storage.
|
|
func (t *FSTree) Init() error {
|
|
return util.MkdirAllX(t.RootPath, t.Permissions)
|
|
}
|
|
|
|
// Close implements common.Storage.
|
|
func (*FSTree) Close() error { return nil }
|