On 22 Jun, 02:34, Justin Ezequiel <[EMAIL PROTECTED]>
wrote:
> def copytree(src, dst, symlinks=False):
>     """Recursively copy a directory tree using copy2().
>
>     The destination directory must not already exist.
>
>     XXX Consider this example code rather than the ultimate tool.
>
>     """
>     names = os.listdir(src)
>     if not os.path.exists(dst): os.makedirs(dst) # add check here

That's the easy bit to fix; what about overwriting existing files
instead of copying them? Do I have to explicitly check for them and
delete them? It seems like there are several different copy functions
in the module and it's not clear what each of them do. What's the
difference between copy, copyfile, and copy2? Why do the docs imply
that they overwrite existing files when copytree skips existing
files?

--
Ben Sizer

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to