find_matching_files

find_matching_files(files: Sequence[Path], file_pattern: str, *, recurse_folder: bool = True) tuple[str, ...][source]

Search for files matching file_pattern.

Parameters:
  • files (Sequence[Path]) – List of paths (files or folders) to check for matching files.

  • file_pattern (str) – Pattern to match files, this a Unix shell-style pattern and nto an regex.

  • recurse_folder (bool) – Whether or not to recurse directories searching for files. Defaults to True

Returns:

Tuple of posix conform string paths to files matching file_pattern.

Return type:

tuple[str,…]