Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GH-105900: Fix pathlib.Path.symlink_to(target_is_directory=...) docs #114035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1510,9 +1510,13 @@ call fails (for example because the path doesn't exist).

.. method:: Path.symlink_to(target, target_is_directory=False)

Make this path a symbolic link to *target*. Under Windows,
*target_is_directory* must be true (default ``False``) if the link's target
is a directory. Under POSIX, *target_is_directory*'s value is ignored.
Make this path a symbolic link pointing to *target*.

On Windows, a symlink represents either a file or a directory, and does not
morph to the target dynamically. If the target is present, the type of the
symlink will be created to match. Otherwise, the symlink will be created
as a directory if *target_is_directory* is ``True`` or a file symlink (the
default) otherwise. On non-Windows platforms, *target_is_directory* is ignored.

::

Expand Down