There was an error while loading. Please reload this page.
pathlib.Path.symlink_to(target_is_directory=...)
1 parent 32c2274 commit b822b85Copy full SHA for b822b85
1 file changed
Doc/library/pathlib.rst
@@ -1539,9 +1539,13 @@ call fails (for example because the path doesn't exist).
1539
1540
.. method:: Path.symlink_to(target, target_is_directory=False)
1541
1542
- Make this path a symbolic link to *target*. Under Windows,
1543
- *target_is_directory* must be true (default ``False``) if the link's target
1544
- 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
1545
+ morph to the target dynamically. If the target is present, the type of the
1546
+ symlink will be created to match. Otherwise, the symlink will be created
1547
+ as a directory if *target_is_directory* is ``True`` or a file symlink (the
1548
+ default) otherwise. On non-Windows platforms, *target_is_directory* is ignored.
1549
1550
::
1551
0 commit comments