forked from TrueCloudLab/frostfs-node
[#585] fstree: Remove unused method
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
eec97d177e
commit
0c52186572
1 changed files with 0 additions and 21 deletions
|
@ -396,27 +396,6 @@ func (t *FSTree) writeFile(p string, data []byte) error {
|
||||||
return err
|
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.
|
// Get returns an object from the storage by address.
|
||||||
func (t *FSTree) Get(ctx context.Context, prm common.GetPrm) (common.GetRes, error) {
|
func (t *FSTree) Get(ctx context.Context, prm common.GetPrm) (common.GetRes, error) {
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in a new issue