MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / safe_copy

Function safe_copy

tools/utils.py:152–166  ·  view source on GitHub ↗
(src, dst)

Source from the content-addressed store, hash-verified

150
151
152def safe_copy(src, dst):
153 logger.debug('copy: %s -> %s', src, dst)
154 src = os.path.abspath(src)
155 dst = os.path.abspath(dst)
156 if os.path.isdir(dst):
157 dst = os.path.join(dst, os.path.basename(src))
158 if src == dst:
159 return
160 if dst == os.devnull:
161 return
162 # Copies data and permission bits, but not other metadata such as timestamp
163 shutil.copy(src, dst)
164 # We always want the target file to be writable even when copying from
165 # read-only source. (e.g. a read-only install of emscripten).
166 make_writable(dst)
167
168
169def read_file(file_path):

Callers 3

run_embind_genFunction · 0.85
phase_source_transformsFunction · 0.85
phase_binaryenFunction · 0.85

Calls 3

make_writableFunction · 0.85
joinMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected