Path & glob functions

Segment-aware path containment, glob matching, and glob-overlap tests.

FunctionDescription
glob_match(pattern: utf8, path: utf8) → boolMatch one concrete path against a glob. * stays within a segment, ** spans segments, ? matches one character, [a-z] / [!x] are character classes. A trailing / on the pattern matches the whole subtree.
glob_overlaps(a: utf8, b: utf8) → boolWhether two glob patterns can match a common path. Concrete paths are patterns too, so this subsumes glob_match for overlap gates. Trailing / means the whole subtree. Conservative: exotic negated-class pairings may report true when no shared path exists, never false when one does.
path_contains(parent: utf8, child: utf8) → boolSegment-aware path prefix test: whether child is parent itself or lives under it. Splits on /, so src/ does not contain src2/x. A path contains itself.