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

Example

>>> collect_files_excluding_gitignore(".")
Returns:

Files not ignored by the gitignore patterns.

Return type:

list[Path]