This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Allow to use shutil.copytree for existing destination directory with optional argument
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.8
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jack1142
Priority: normal Keywords:

Created on 2019-05-16 14:19 by jack1142, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg342645 - (view) Author: Jakub Kuczys (jack1142) * Date: 2019-05-16 14:19
Currently shutil.copytree will allow to copy tree only if destination directory doesn't exist. I think there could be added `exist_ok` keyword argument (defaulting to `False`), which when set to `True` would prevent function from raising `FileExistsError`.
This is pretty easy to implement as `os.makedirs` command that raises this error already has `exist_ok` kwarg, which prevent function from raising that exception already.
msg342646 - (view) Author: Jakub Kuczys (jack1142) * Date: 2019-05-16 14:24
Sorry, it looks like I was looking at 3.7 branch and this is already implemented in master branch.
Date User Action Args
2022-04-11 14:59:15adminsetgithub: 81120
2019-05-16 14:24:18jack1142setstatus: open -> closed

messages: + msg342646
stage: resolved
2019-05-16 14:19:44jack1142create