[Python-checkins] cpython: whatsnew: os.path.ismount recognizes volumes mounted below root.
r.david.murray
python-checkins at python.org
Sat Feb 22 22:34:48 CET 2014
http://hg.python.org/cpython/rev/8fd64292175e
changeset: 89327:8fd64292175e
user: R David Murray <rdmurray at bitdance.com>
date: Sat Feb 22 16:31:26 2014 -0500
summary:
whatsnew: os.path.ismount recognizes volumes mounted below root.
files:
Doc/library/os.path.rst | 8 +++++++-
Doc/whatsnew/3.4.rst | 3 +++
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -194,10 +194,16 @@
.. function:: ismount(path)
Return ``True`` if pathname *path* is a :dfn:`mount point`: a point in a file
- system where a different file system has been mounted. The function checks
+ system where a different file system has been mounted. On POSIX, the function checks
whether *path*'s parent, :file:`path/..`, is on a different device than *path*,
or whether :file:`path/..` and *path* point to the same i-node on the same
device --- this should detect mount points for all Unix and POSIX variants.
+ On Windows, a drive letter root and a share UNC are always mount
+ points, and for any other path ``GetVolumePathName`` is called to see if it
+ is different from the input path.
+
+ .. versionadded:: 3.4
+ Support for detecting non-root mount points on Windows.
.. function:: join(path1[, path2[, ...]])
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -960,6 +960,9 @@
:func:`os.path.samefile` implementation is now shared between Unix and
Windows). (Contributed by Brian Curtin in :issue:`11939`.)
+:func:`os.path.ismount` now recognizes volumes mounted below a drive
+root on Windows. (Contributed by Tim Golden in :issue:`9035`.)
+
pdb
---
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list