Document Path.is_mount(), update Misc/ACKS and Misc/NEWS (#2980)

This commit is contained in:
Łukasz Langa 2017-08-01 16:47:50 -07:00 committed by GitHub
parent 9d8e6ec8d2
commit 47320a652e
3 changed files with 16 additions and 0 deletions

View file

@ -761,6 +761,18 @@ call fails (for example because the path doesn't exist):
other errors (such as permission errors) are propagated. other errors (such as permission errors) are propagated.
.. method:: Path.is_mount()
Return ``True`` if the path is a :dfn:`mount point`: a point in a
file 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. Not implemented on Windows.
.. versionadded:: 3.7
.. method:: Path.is_symlink() .. method:: Path.is_symlink()
Return ``True`` if the path points to a symbolic link, ``False`` otherwise. Return ``True`` if the path points to a symbolic link, ``False`` otherwise.

View file

@ -886,6 +886,7 @@ Inyeol Lee
James Lee James Lee
John J. Lee John J. Lee
Thomas Lee Thomas Lee
Cooper Ry Lees
Tennessee Leeuwenburg Tennessee Leeuwenburg
Luc Lefebvre Luc Lefebvre
Pierre Paul Lefebvre Pierre Paul Lefebvre

View file

@ -0,0 +1,3 @@
``pathlib.Path`` objects now include an ``is_mount()`` method (only
implemented on POSIX). This is similar to ``os.path.ismount(p)``. Patch by
Cooper Ry Lees.