MCPcopy Create free account
hub / github.com/cztomczak/cefpython / copy_directory

Function copy_directory

tools/automate-git.py:218–227  ·  view source on GitHub ↗

Copies a directory from source to target.

(source, target, allow_overwrite=False)

Source from the content-addressed store, hash-verified

216
217
218def copy_directory(source, target, allow_overwrite=False):
219 """ Copies a directory from source to target. """
220 if not options.dryrun and os.path.exists(target):
221 if not allow_overwrite:
222 raise Exception("Directory %s already exists" % (target))
223 remove_directory(target)
224 if os.path.exists(source):
225 msg("Copying directory %s to %s" % (source, target))
226 if not options.dryrun:
227 shutil.copytree(source, target)
228
229
230def move_directory(source, target, allow_overwrite=False):

Callers 1

automate-git.pyFile · 0.85

Calls 1

msgFunction · 0.85

Tested by

no test coverage detected