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

Class _StringGlobber

Lib/glob.py:537–553  ·  view source on GitHub ↗

Provides shell-style pattern matching and globbing for string paths.

Source from the content-addressed store, hash-verified

535
536
537class _StringGlobber(_GlobberBase):
538 """Provides shell-style pattern matching and globbing for string paths.
539 """
540 lexists = staticmethod(os.path.lexists)
541 concat_path = operator.add
542
543 @staticmethod
544 def scandir(path):
545 # We must close the scandir() object before proceeding to
546 # avoid exhausting file descriptors when globbing deep trees.
547 with os.scandir(path) as scandir_it:
548 entries = list(scandir_it)
549 return ((entry, entry.name, entry.path) for entry in entries)
550
551 @staticmethod
552 def stringify_path(path):
553 return path # Already a string.

Callers 3

full_matchMethod · 0.90
matchMethod · 0.90
globMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…