mutapath.Path.merge_tree

Path.merge_tree(dst, symlinks=False, *, update=False, copy_function=<function copy2>, ignore=<function Path.<lambda>>)[source]

Copy entire contents of self to dst, overwriting existing contents in dst with those in self.

Pass symlinks=True to copy symbolic links as links.

Accepts a copy_function, similar to copytree.

To avoid overwriting newer files, supply a copy function wrapped in only_newer. For example:

src.merge_tree(dst, copy_function=only_newer(shutil.copy2))