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

Function copy_tree

system/lib/update_llvm_libc.py:62–75  ·  view source on GitHub ↗
(upstream_dir, local_dir)

Source from the content-addressed store, hash-verified

60
61
62def copy_tree(upstream_dir, local_dir):
63 if not os.path.exists(local_dir):
64 os.makedirs(local_dir)
65 for f in os.listdir(upstream_dir):
66 full = os.path.join(upstream_dir, f)
67 if os.path.isdir(full):
68 shutil.copytree(full, os.path.join(local_dir, f))
69 elif f not in excludes:
70 shutil.copy2(full, os.path.join(local_dir, f))
71 for root, dirs, files in os.walk(local_dir):
72 for f in files:
73 if f in excludes:
74 full = os.path.join(root, f)
75 os.remove(full)
76
77
78def main():

Callers 1

mainFunction · 0.70

Calls 3

existsMethod · 0.80
joinMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected