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

@ -1223,6 +1223,12 @@ class Path(PurePath):
# Non-encodable path
return False
def is_junction(self):
"""
Whether this path is a junction.
"""
return self._flavour.pathmod.isjunction(self)
def is_block_device(self):
"""
Whether this path is a block device.