FilePatternMatcher
classgworker_client.filematch.FilePatternMatcher
Holds a list of glob patterns and tests file paths against them. Used internally by the CLI to apply .gworkerignore exclusions during tarball creation.
Class
python
1class FilePatternMatcherMethods
from_file
python
1from_file(path: str | Path) -> FilePatternMatcherRead glob patterns from a file (one per line, # comments supported). Intended for .gworkerignore files.
matches
python
1matches(relpath: str) -> boolReturn True if relpath matches any pattern. Paths are forward-slash normalised before matching.
filter
python
1filter(paths: Iterable[str]) -> list[str]Return only the paths that should be kept (i.e. those that do NOT match any ignore pattern).