Skip to content

fs

Intersect L2 — filesystem (intersect/fs).

The only layer that reads disk and the only one carrying a runtime dependency (a globber, tinyglobby). It enumerates real files with the globber, then filters via the pure path API (L1/L0) — it does not re-implement matching. This is where “which files exist and fall in this scope” lives; L0/L1 stay pure questions about patterns. See docs/planning/decisions/D-4FRD-intersect-api/layered-api.md.

Semantics are IDENTICAL to the pure layer: the globber is used only to enumerate the tree; every include/exclude decision is made by the path API’s matches. So a bare path is an exact match and a subtree needs **, exactly as at L1 — the globber’s own dialect never leaks into the result.

tinyglobby is imported ONLY here; the core entries (./index, ./segments, ./parse, ./registry) never reference it, keeping them zero-dependency per [[D-4FRD-intersect-api]] Option C.