(ctx context.Context, obj model.Obj, dir model.Obj)
| 292 | } |
| 293 | |
| 294 | func (d *HalalCloud) move(ctx context.Context, obj model.Obj, dir model.Obj) (model.Obj, error) { |
| 295 | oldDir := userfile.NewFormattedPath(d.GetCurrentDir(obj)).GetPath() |
| 296 | newDir := userfile.NewFormattedPath(d.GetCurrentDir(dir)).GetPath() |
| 297 | _, err := pubUserFile.NewPubUserFileClient(d.HalalCommon.serv.GetGrpcConnection()).Move(ctx, &pubUserFile.BatchOperationRequest{ |
| 298 | Source: []*pubUserFile.File{ |
| 299 | { |
| 300 | Identity: obj.GetID(), |
| 301 | Path: oldDir, |
| 302 | }, |
| 303 | }, |
| 304 | Dest: &pubUserFile.File{ |
| 305 | Identity: dir.GetID(), |
| 306 | Path: newDir, |
| 307 | }, |
| 308 | }) |
| 309 | return nil, err |
| 310 | } |
| 311 | |
| 312 | func (d *HalalCloud) rename(ctx context.Context, obj model.Obj, name string) (model.Obj, error) { |
| 313 | id := obj.GetID() |
no test coverage detected