pyufunc.collect_files_excluding_gitignore#
- pyufunc.collect_files_excluding_gitignore(root_dir, gitignore_path=None)#
Collect files under a directory while excluding gitignore matches.
- Parameters:
root_dir – Directory to scan recursively.
gitignore_path – Optional gitignore-style file. Defaults to
root_dir/.gitignore.
Note
Source package:
pathspec.Source repository: cpburnz/python-pathspec
Source document: https://python-path-specification.readthedocs.io/en/latest/index.html
Source license: Mozilla Public License 2.0.
Example
>>> collect_files_excluding_gitignore(".")
- Returns:
Files not ignored by the gitignore patterns.
- Return type:
list[Path]