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

Method select_wildcard

Lib/glob.py:443–460  ·  view source on GitHub ↗
(path, exists=False)

Source from the content-addressed store, hash-verified

441 select_next = self.selector(parts)
442
443 def select_wildcard(path, exists=False):
444 try:
445 entries = self.scandir(path)
446 except OSError:
447 pass
448 else:
449 for entry, entry_name, entry_path in entries:
450 if match is None or match(entry_name):
451 if dir_only:
452 try:
453 if not entry.is_dir():
454 continue
455 except OSError:
456 continue
457 entry_path = self.concat_path(entry_path, self.sep)
458 yield from select_next(entry_path, exists=True)
459 else:
460 yield entry_path
461 return select_wildcard
462
463 def recursive_selector(self, part, parts):

Callers

nothing calls this directly

Calls 4

scandirMethod · 0.95
concat_pathMethod · 0.95
matchFunction · 0.85
is_dirMethod · 0.45

Tested by

no test coverage detected