MCPcopy Index your code
hub / github.com/python/cpython / select_exists

Method select_exists

Lib/glob.py:526–534  ·  view source on GitHub ↗

Yields the given path, if it exists.

(self, path, exists=False)

Source from the content-addressed store, hash-verified

524 return select_recursive
525
526 def select_exists(self, path, exists=False):
527 """Yields the given path, if it exists.
528 """
529 if exists:
530 # Optimization: this path is already known to exist, e.g. because
531 # it was returned from os.scandir(), so we skip calling lstat().
532 yield path
533 elif self.lexists(path):
534 yield path
535
536
537class _StringGlobber(_GlobberBase):

Callers

nothing calls this directly

Calls 1

lexistsMethod · 0.95

Tested by

no test coverage detected