MCPcopy
hub / github.com/pex-tool/pex / do_copy

Function do_copy

pex/common.py:180–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178def safe_copy(source, dest, overwrite=False):
179 # type: (Text, Text, bool) -> None
180 def do_copy():
181 # type: () -> None
182 temp_dest = dest + uuid4().hex
183 shutil.copy(source, temp_dest)
184 safe_rename(temp_dest, dest)
185
186 # If the platform supports hard-linking, use that and fall back to copying.
187 # Windows does not support hard-linking.

Callers 1

safe_copyFunction · 0.85

Calls 2

safe_renameFunction · 0.90
copyMethod · 0.45

Tested by

no test coverage detected