Add matches_directory_with_exceptions for matching a path against a list of globs with exceptions.
This will allow us to implement a file crawler.
The current implementation has the same limitations as Git: only directly in exception are doesn't match.
Encapsulating this in a method, will allow us to improve its implementation if one day we switch to another glob library that supports prefix matching.
Summary
Add
matches_directory_with_exceptions
for matching a path against a list of globs with exceptions. This will allow us to implement a file crawler. The current implementation has the same limitations as Git: only directly in exception are doesn't match. Encapsulating this in a method, will allow us to improve its implementation if one day we switch to another glob library that supports prefix matching.Test Plan
I added doc tests. CI must pass.