mirror of
https://github.com/python/cpython.git
synced 2025-09-09 02:11:51 +00:00
gh-99547: Add isjunction methods for checking if a path is a junction (GH-99548)
This commit is contained in:
parent
c2102136be
commit
1b2de89bce
15 changed files with 182 additions and 24 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue