[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

Jason R. Coombs report at bugs.python.org
Wed Sep 2 22:18:37 CEST 2009


Jason R. Coombs <jaraco at jaraco.com> added the comment:

The deviance between the Unix and Windows symlink functions is apparent
in the signature, though not explicitly-defined in any formal
documentation.  Perhaps the following could be included as formal
documentation.  Should this documentation be added to os.rst, or would
another place be better?

The Windows version takes an additional, optional parameter,
target_is_directory, which defaults to 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).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1578269>
_______________________________________


More information about the Python-bugs-list mailing list