gh-99547: Add isjunction methods for checking if a path is a junction (GH-99548)

This commit is contained in:
Charles Machalow 2022-11-22 09:19:34 -08:00 • committed by GitHub
parent c2102136be
commit 1b2de89bce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 182 additions and 24 deletions

View file

@ -891,6 +891,14 @@ call fails (for example because the path doesn't exist).
other errors (such as permission errors) are propagated.
.. method:: Path.is_junction()
Return ``True`` if the path points to a junction, and ``False`` for any other
type of file. Currently only Windows supports junctions.
.. versionadded:: 3.12
.. method:: Path.is_mount()
Return ``True`` if the path is a :dfn:`mount point`: a point in a