Provides shell-style pattern matching and globbing for string paths.
| 522 | |
| 523 | |
| 524 | class _StringGlobber(_GlobberBase): |
| 525 | """Provides shell-style pattern matching and globbing for string paths. |
| 526 | """ |
| 527 | lexists = staticmethod(os.path.lexists) |
| 528 | concat_path = operator.add |
| 529 | |
| 530 | @staticmethod |
| 531 | def scandir(path): |
| 532 | # We must close the scandir() object before proceeding to |
| 533 | # avoid exhausting file descriptors when globbing deep trees. |
| 534 | with os.scandir(path) as scandir_it: |
| 535 | entries = list(scandir_it) |
| 536 | return ((entry, entry.name, entry.path) for entry in entries) |
| 537 | |
| 538 | |
| 539 | class _PathGlobber(_GlobberBase): |
no outgoing calls
no test coverage detected