(path string)
| 41 | } |
| 42 | |
| 43 | func (d *Strm) getRootAndPath(path string) (string, string) { |
| 44 | if d.autoFlatten { |
| 45 | return d.oneKey, path |
| 46 | } |
| 47 | path = strings.TrimPrefix(path, "/") |
| 48 | parts := strings.SplitN(path, "/", 2) |
| 49 | if len(parts) == 1 { |
| 50 | return parts[0], "" |
| 51 | } |
| 52 | return parts[0], parts[1] |
| 53 | } |
| 54 | |
| 55 | func (d *Strm) list(ctx context.Context, dst, sub string, args *fs.ListArgs) ([]model.Obj, error) { |
| 56 | reqPath := stdpath.Join(dst, sub) |