(ctx context.Context, path string)
| 60 | } |
| 61 | |
| 62 | func (d *Alias) Get(ctx context.Context, path string) (model.Obj, error) { |
| 63 | if utils.PathEqual(path, "/") { |
| 64 | return &model.Object{ |
| 65 | Name: "Root", |
| 66 | IsFolder: true, |
| 67 | Path: "/", |
| 68 | }, nil |
| 69 | } |
| 70 | root, sub := d.getRootAndPath(path) |
| 71 | dsts, ok := d.pathMap[root] |
| 72 | if !ok { |
| 73 | return nil, errs.ObjectNotFound |
| 74 | } |
| 75 | for _, dst := range dsts { |
| 76 | obj, err := d.get(ctx, path, dst, sub) |
| 77 | if err == nil { |
| 78 | return obj, nil |
| 79 | } |
| 80 | } |
| 81 | return nil, errs.ObjectNotFound |
| 82 | } |
| 83 | |
| 84 | func (d *Alias) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error) { |
| 85 | path := dir.GetPath() |
nothing calls this directly
no test coverage detected