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

Method resource_path

Lib/importlib/resources/readers.py:176–182  ·  view source on GitHub ↗

Return the file system path to prevent `resources.path()` from creating a temporary copy.

(self, resource)

Source from the content-addressed store, hash-verified

174 yield zipfile.Path(path_str[: match.start()], inner.lstrip('/'))
175
176 def resource_path(self, resource):
177 """
178 Return the file system path to prevent
179 `resources.path()` from creating a temporary
180 copy.
181 """
182 return str(self.path.joinpath(resource))
183
184 def files(self):
185 return self.path

Callers 1

test_resource_pathMethod · 0.95

Calls 2

strFunction · 0.85
joinpathMethod · 0.45

Tested by 1

test_resource_pathMethod · 0.76