Return a list of file paths based on a list of glob patterns. Only files are returned, not directories, and optionally only files for which the user has a specified access to. :param patterns: Iterable of file names and/or glob patterns :param access: file access type to verify (os.* w
(patterns: Iterable[str], access: int = os.F_OK)
| 345 | |
| 346 | |
| 347 | def files_from_glob_patterns(patterns: Iterable[str], access: int = os.F_OK) -> list[str]: |
| 348 | """Return a list of file paths based on a list of glob patterns. |
| 349 | |
| 350 | Only files are returned, not directories, and optionally only files for which the user has a specified access to. |
| 351 | |
| 352 | :param patterns: Iterable of file names and/or glob patterns |
| 353 | :param access: file access type to verify (os.* where * is F_OK, R_OK, W_OK, or X_OK) |
| 354 | :return: list of files matching the names and/or glob patterns |
| 355 | """ |
| 356 | files = [] |
| 357 | for pattern in patterns: |
| 358 | matches = files_from_glob_pattern(pattern, access=access) |
| 359 | files.extend(matches) |
| 360 | return files |
| 361 | |
| 362 | |
| 363 | def get_exes_in_path(starts_with: str) -> list[str]: |
nothing calls this directly
no test coverage detected
searching dependent graphs…