def copyTree(src, dst, symlinks=False, ignore=None):
if not os.path.exists(dst):<EOL><INDENT>os.makedirs(dst)<EOL><DEDENT>for item in os.listdir(src):<EOL><INDENT>s = os.path.join(src, item)<EOL>d = os.path.join(dst, item)<EOL>if os.path.isdir(s):<EOL><INDENT>copyTree(s, d, symlinks, ignore)<EOL><DEDENT>else:<EOL><INDENT>if not os.path.exists(d) or os.stat(<EOL>src).st_mtime - os.stat(dst).st_mtime > <NUM_LIT:1>:<EOL><INDENT>shutil.copy2(s, d)<EOL><DEDENT><DEDENT><DEDENT>
copy one dir-tree into another
combine dirs of the same name
replacing files of same name