MCPcopy Index your code
hub / github.com/ekalinin/nodeenv / copytree

Function copytree

nodeenv.py:658–673  ·  view source on GitHub ↗
(src, dst, symlinks=False, ignore=None)

Source from the content-addressed store, hash-verified

656
657
658def copytree(src, dst, symlinks=False, ignore=None):
659 for item in os.listdir(src):
660 s = os.path.join(src, item)
661 d = os.path.join(dst, item)
662 if os.path.isdir(s):
663 try:
664 shutil.copytree(s, d, symlinks, ignore)
665 except OSError:
666 copytree(s, d, symlinks, ignore)
667 else:
668 if os.path.islink(s):
669 # copy link only if it not exists. #189
670 if not os.path.islink(d):
671 os.symlink(os.readlink(s), d)
672 else:
673 shutil.copy2(s, d)
674
675
676def copy_node_from_prebuilt(env_dir, src_dir, node_version):

Callers 1

copy_node_from_prebuiltFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected