(ctx context.Context, obj model.Obj, dir model.Obj)
| 322 | } |
| 323 | |
| 324 | func (d *HalalCloud) copy(ctx context.Context, obj model.Obj, dir model.Obj) (model.Obj, error) { |
| 325 | id := obj.GetID() |
| 326 | sourcePath := userfile.NewFormattedPath(d.GetCurrentDir(obj)).GetPath() |
| 327 | if len(id) > 0 { |
| 328 | sourcePath = "" |
| 329 | } |
| 330 | dest := &pubUserFile.File{ |
| 331 | Identity: dir.GetID(), |
| 332 | Path: userfile.NewFormattedPath(d.GetCurrentDir(dir)).GetPath(), |
| 333 | } |
| 334 | _, err := pubUserFile.NewPubUserFileClient(d.HalalCommon.serv.GetGrpcConnection()).Copy(ctx, &pubUserFile.BatchOperationRequest{ |
| 335 | Source: []*pubUserFile.File{ |
| 336 | { |
| 337 | Path: sourcePath, |
| 338 | Identity: id, |
| 339 | }, |
| 340 | }, |
| 341 | Dest: dest, |
| 342 | }) |
| 343 | return nil, err |
| 344 | } |
| 345 | |
| 346 | func (d *HalalCloud) remove(ctx context.Context, obj model.Obj) error { |
| 347 | id := obj.GetID() |
no test coverage detected