Remove an object
(ctx context.Context)
| 310 | |
| 311 | // Remove an object |
| 312 | func (o *Object) Remove(ctx context.Context) error { |
| 313 | bucketName, bucketPath := o.split() |
| 314 | req := objectstorage.DeleteObjectRequest{ |
| 315 | NamespaceName: common.String(o.fs.opt.Namespace), |
| 316 | BucketName: common.String(bucketName), |
| 317 | ObjectName: common.String(bucketPath), |
| 318 | } |
| 319 | err := o.fs.pacer.Call(func() (bool, error) { |
| 320 | resp, err := o.fs.srv.DeleteObject(ctx, req) |
| 321 | return shouldRetry(ctx, resp.HTTPResponse(), err) |
| 322 | }) |
| 323 | return err |
| 324 | } |
| 325 | |
| 326 | // Open object file |
| 327 | func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadCloser, error) { |
nothing calls this directly
no test coverage detected