chitralverma opened a new pull request, #7629:
URL: https://github.com/apache/opendal/pull/7629

   # Which issue does this PR close?
   
   Closes #6535.
   
   # Rationale for this change
   
   Issue #6535 requests glob support on `list` operations. Naive client-side 
`list-then-filter` over recursive listings is wasteful for selective patterns. 
RFC-6209 + #6535 specify *guided traversal*: walk the pattern 
segment-by-segment, list only what could match, prune everything else.
   
   # What changes are included in this PR?
   
   - `OpList::with_glob` / `ListOptions::glob` / `Capability::list_with_glob` 
plumbing, `.glob()` on `FutureList`/`FutureLister`, capability-check rejection.
   - Internal `glob_matcher` (no new deps): fsspec/pathlib syntax — `*`, `?`, 
`**`, `[abc]`, `[!abc]`, `{a,b}`. Rejects `a**b` and trailing `\`.
   - Opt-in `GlobLayer` (sibling of `SimulateLayer`):
     - Passthrough when `native_capability.list_with_glob = true`.
     - Otherwise drives guided traversal: literals consumed without listing; 
glob segments → one non-recursive list per matching parent; `**` fans out only 
over plausible dirs.
     - Frame dedup via `visited: HashSet<(path, idx)>` (NFA→DFA); emission-side 
path dedup as belt-and-braces.
     - `limit` enforced post-filter; `start_after` rejected under client-side 
glob.
   
   # Are there any user-facing changes?
   
   Yes, additive only:
   
   - New `Capability::list_with_glob` field (defaults to `false`).
   - New `OpList::with_glob` / `glob()`, `ListOptions::glob`.
   - New `.glob(&str)` on `FutureList` / `FutureLister`.
   - New `layers::GlobLayer` — opt-in.
   
   No existing behavior changes. No breaking changes.
   
   # AI Usage Statement
   
   Implemented with assistance from Claude (Opus 4.7) via opencode. All code 
reviewed and tested locally; 24 unit/integration tests added against 
`services::Memory` (including a `**`-zero regression for the 
consecutive-DoubleStar case).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to