Yields the given path, if it exists.
(self, path, exists=False)
| 511 | return select_recursive |
| 512 | |
| 513 | def select_exists(self, path, exists=False): |
| 514 | """Yields the given path, if it exists. |
| 515 | """ |
| 516 | if exists: |
| 517 | # Optimization: this path is already known to exist, e.g. because |
| 518 | # it was returned from os.scandir(), so we skip calling lstat(). |
| 519 | yield path |
| 520 | elif self.lexists(path): |
| 521 | yield path |
| 522 | |
| 523 | |
| 524 | class _StringGlobber(_GlobberBase): |