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

Function _write_contents

Lib/importlib/resources/_common.py:169–177  ·  view source on GitHub ↗
(target, source)

Source from the content-addressed store, hash-verified

167
168
169def _write_contents(target, source):
170 child = target.joinpath(source.name)
171 if source.is_dir():
172 child.mkdir()
173 for item in source.iterdir():
174 _write_contents(child, item)
175 else:
176 child.write_bytes(source.read_bytes())
177 return child

Callers 1

_temp_dirFunction · 0.85

Calls 6

joinpathMethod · 0.45
is_dirMethod · 0.45
mkdirMethod · 0.45
iterdirMethod · 0.45
write_bytesMethod · 0.45
read_bytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…