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

Method is_resource

Lib/importlib/resources/abc.py:169–170  ·  view source on GitHub ↗
(self, path: StrPath)

Source from the content-addressed store, hash-verified

167 raise FileNotFoundError(resource)
168
169 def is_resource(self, path: StrPath) -> bool:
170 return self.files().joinpath(path).is_file()
171
172 def contents(self) -> Iterator[str]:
173 return (item.name for item in self.files().iterdir())

Callers

nothing calls this directly

Calls 3

filesMethod · 0.95
is_fileMethod · 0.45
joinpathMethod · 0.45

Tested by

no test coverage detected