Skip to content

Commit 2dad979

Browse files
committed
gh-132416: document behavior of Path.symlink_to() when link or/and target already exist
1 parent 3169743 commit 2dad979

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Doc/library/pathlib.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,6 +1535,8 @@ Creating files and directories
15351535
as a directory if *target_is_directory* is true or a file symlink (the
15361536
default) otherwise. On non-Windows platforms, *target_is_directory* is ignored.
15371537

1538+
If the link or/and the target already exist, :exc:`FileExistsError` is raised.
1539+
15381540
::
15391541

15401542
>>> p = Path('mylink')

0 commit comments

Comments
 (0)