From 0c52186572d26021cca1492293d4395e75cefd4e Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Thu, 10 Aug 2023 18:42:35 +0300 Subject: [PATCH] [#585] fstree: Remove unused method Signed-off-by: Dmitrii Stepanov --- .../blobstor/fstree/fstree.go | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/pkg/local_object_storage/blobstor/fstree/fstree.go b/pkg/local_object_storage/blobstor/fstree/fstree.go index 637bf8438f..2692fbf7e0 100644 --- a/pkg/local_object_storage/blobstor/fstree/fstree.go +++ b/pkg/local_object_storage/blobstor/fstree/fstree.go @@ -396,27 +396,6 @@ func (t *FSTree) writeFile(p string, data []byte) error { return err } -// PutStream puts executes handler on a file opened for write. -func (t *FSTree) PutStream(addr oid.Address, handler func(*os.File) error) error { - if t.readOnly { - return common.ErrReadOnly - } - - p := t.treePath(addr) - - if err := util.MkdirAllX(filepath.Dir(p), t.Permissions); err != nil { - return err - } - - f, err := os.OpenFile(p, t.writeFlags(), t.Permissions) - if err != nil { - return err - } - defer f.Close() - - return handler(f) -} - // Get returns an object from the storage by address. func (t *FSTree) Get(ctx context.Context, prm common.GetPrm) (common.GetRes, error) { var (