# HG changeset patch # User Jason R. Coombs # Date 1252161767 14400 # Branch py3k # Node ID 992c46cf629f90b466d3224008d083292b85741d # Parent 2ba9a1d659dbbdd499fb9f0e455181995da8ac83 Updated documentation to reflect changes to symlink support. diff -r 2ba9a1d659db -r 992c46cf629f Doc/library/os.rst --- a/Doc/library/os.rst Wed Sep 02 22:01:36 2009 -0400 +++ b/Doc/library/os.rst Sat Sep 05 10:42:47 2009 -0400 @@ -828,7 +828,7 @@ Like :func:`stat`, but do not follow symbolic links. This is an alias for :func:`stat` on platforms that do not support symbolic links, such as - Windows. + Windows prior to 6.0 (Vista). .. function:: mkfifo(path[, mode]) @@ -1090,8 +1090,24 @@ .. function:: symlink(source, link_name) - Create a symbolic link pointing to *source* named *link_name*. Availability: - Unix. + Create a symbolic link pointing to *source* named *link_name*. On Windows, + symlink version takes an additional, optional parameter, 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 + morph to the target dynamically. For this reason, when creating a + symlink on Windows, if the target is not already present, the symlink + will default to being a file symlink. If target_is_directory is set to + True, the symlink will be created as a directory symlink. This + parameter is ignored if the target exists (and the symlink is created + with the same type as the target). + + Symbolic link support was introduced in Windows 6.0. *symlink* will raise + a NotImplementedError on Windows versions earlier than 6.0. + + Availability: Unix, Windows. .. function:: unlink(path)