frostfs-node/pkg/local_object_storage/blobstor/fstree/control.go
Evgenii Stratonikov b9a2055e1c [#1686] blobstor/*: Return ErrReadOnly for modifying operations
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>
2022-08-30 10:02:43 +03:00

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 }