Commit 64a41edb authored by Georg Brandl's avatar Georg Brandl

Copyedit of os.symlink() docs.

parent a102ae34
...@@ -1371,27 +1371,25 @@ Files and Directories ...@@ -1371,27 +1371,25 @@ Files and Directories
.. function:: symlink(source, link_name) .. function:: symlink(source, link_name)
symlink(source, link_name, target_is_directory=False)
Create a symbolic link pointing to *source* named *link_name*. Create a symbolic link pointing to *source* named *link_name*.
On Windows, symlink version takes an additional, optional parameter, On Windows, symlink version takes an additional optional parameter,
*target_is_directory*, which defaults to False. *target_is_directory*, which defaults to ``False``.
symlink(source, link_name, target_is_directory=False)
On Windows, a symlink represents a file or a directory, and does not On Windows, a symlink represents a file or a directory, and does not morph to
morph to the target dynamically. For this reason, when creating a the target dynamically. For this reason, when creating a symlink on Windows,
symlink on Windows, if the target is not already present, the symlink if the target is not already present, the symlink will default to being a
will default to being a file symlink. If *target_is_directory* is set to file symlink. If *target_is_directory* is set to ``True``, the symlink will
True, the symlink will be created as a directory symlink. This be created as a directory symlink. This parameter is ignored if the target
parameter is ignored if the target exists (and the symlink is created exists (and the symlink is created with the same type as the target).
with the same type as the target).
Symbolic link support was introduced in Windows 6.0 (Vista). *symlink* Symbolic link support was introduced in Windows 6.0 (Vista). :func:`symlink`
will raise a NotImplementedError on Windows versions earlier than 6.0. The will raise a :exc:`NotImplementedError` on Windows versions earlier than 6.0.
SeCreateSymbolicLinkPrivilege is required in order to create symlinks. The *SeCreateSymbolicLinkPrivilege* is required in order to create symlinks.
Availability: Unix, Windows Availability: Unix, Windows.
.. versionchanged:: 3.2 .. versionchanged:: 3.2
Added support for Windows 6.0 (Vista) symbolic links. Added support for Windows 6.0 (Vista) symbolic links.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment