summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.path.rst
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-07-08 21:39:08 (GMT)
committerBrian Curtin <brian.curtin@gmail.com>2010-07-08 21:39:08 (GMT)
commitd40e6f70a5edabffcbfff22912163520da3a29e2 (patch)
treeef8d44ca974bf606f3437d2ce9977207b8748174 /Doc/library/os.path.rst
parent0dd8f7890a3396eaef8c740588c65af9422a65a5 (diff)
downloadcpython-d40e6f70a5edabffcbfff22912163520da3a29e2.zip
cpython-d40e6f70a5edabffcbfff22912163520da3a29e2.tar.gz
cpython-d40e6f70a5edabffcbfff22912163520da3a29e2.tar.bz2
Implement #1578269. Patch by Jason R. Coombs.
Added Windows support for os.symlink when run on Windows 6.0 or greater, aka Vista. Previous Windows versions will raise NotImplementedError when trying to symlink. Includes numerous test updates and additions to test_os, including a symlink_support module because of the fact that privilege escalation is required in order to run the tests to ensure that the user is able to create symlinks. By default, accounts do not have the required privilege, so the escalation code will have to be exposed later (or documented on how to do so). I'll be following up with that work next. Note that the tests use ctypes, which was agreed on during the PyCon language summit.
Diffstat (limited to 'Doc/library/os.path.rst')
-rw-r--r--Doc/library/os.path.rst12
1 files changed, 8 insertions, 4 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index c838983..7fcb2a9 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -231,11 +231,15 @@ applications should use string objects to access all files.
.. function:: samefile(path1, path2)
- Return ``True`` if both pathname arguments refer to the same file or directory
- (as indicated by device number and i-node number). Raise an exception if a
- :func:`os.stat` call on either pathname fails.
+ Return ``True`` if both pathname arguments refer to the same file or directory.
+ On Unix, this is determined by the device number and i-node number and raises an
+ exception if a :func:`os.stat` call on either pathname fails.
- Availability: Unix.
+ On Windows, two files are the same if they resolve to the same final path
+ name using the Windows API call GetFinalPathNameByHandle and this function
+ raises an exception if handles cannot be obtained to either file.
+
+ Availability: Windows, Unix.
.. function:: sameopenfile(fp1, fp2)