diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-09 19:02:01 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-09 19:02:01 +0300 |
commit | 4a29d649866ff133e0b8f8a1009e1000a44d7279 (patch) | |
tree | 547229aded91b3760628c646a144af604f1c3e2b /contrib/tools/python3/src/Lib/shutil.py | |
parent | 782f2445a283aed9a66e699137b3349af1689c29 (diff) | |
download | ydb-4a29d649866ff133e0b8f8a1009e1000a44d7279.tar.gz |
intermediate changes
ref:478170c7a5a1c0788ddd0d6513ce4ed86d7d7c99
Diffstat (limited to 'contrib/tools/python3/src/Lib/shutil.py')
-rw-r--r-- | contrib/tools/python3/src/Lib/shutil.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/tools/python3/src/Lib/shutil.py b/contrib/tools/python3/src/Lib/shutil.py index 37bf98df79..2768bcf6ab 100644 --- a/contrib/tools/python3/src/Lib/shutil.py +++ b/contrib/tools/python3/src/Lib/shutil.py @@ -516,9 +516,6 @@ def copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2, ignore_dangling_symlinks=False, dirs_exist_ok=False): """Recursively copy a directory tree and return the destination directory. - dirs_exist_ok dictates whether to raise an exception in case dst or any - missing parent directory already exists. - If exception(s) occur, an Error is raised with a list of reasons. If the optional symlinks flag is true, symbolic links in the @@ -549,6 +546,11 @@ def copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2, destination path as arguments. By default, copy2() is used, but any function that supports the same signature (like copy()) can be used. + If dirs_exist_ok is false (the default) and `dst` already exists, a + `FileExistsError` is raised. If `dirs_exist_ok` is true, the copying + operation will continue if it encounters existing directories, and files + within the `dst` tree will be overwritten by corresponding files from the + `src` tree. """ sys.audit("shutil.copytree", src, dst) with os.scandir(src) as itr: |