8000 gh-84714: Add behavior if dst file exists (GH-91867) · python/cpython@bba721d · GitHub
[go: up one dir, main page]

Skip to content

Commit bba721d

Browse files
gh-84714: Add behavior if dst file exists (GH-91867)
(cherry picked from commit 9166ace) Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
1 parent d985c8e commit bba721d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/shutil.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ Directory and files operations
160160
Copies the file *src* to the file or directory *dst*. *src* and *dst*
161161
should be :term:`path-like objects <path-like object>` or strings. If
162162
*dst* specifies a directory, the file will be copied into *dst* using the
163-
base filename from *src*. Returns the path to the newly created file.
163+
base filename from *src*. If *dst* specifies a file that already exists,
164+
it will be replaced. Returns the path to the newly created file.
164165

165166
If *follow_symlinks* is false, and *src* is a symbolic link,
166167
*dst* will be created as a symbolic link. If *follow_symlinks*

0 commit comments

Comments
 (0)
0