summaryrefslogtreecommitdiffstats
path: root/Lib/macpath.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-01-15 22:45:48 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-01-15 22:45:48 (GMT)
commit791f7d4783a732720f9fdcd39f530267efc9e4df (patch)
treed2d1ae47f76f7786f6634a91f7fe1bec2f15ade2 /Lib/macpath.py
parent2d0909b9cb9c4c2ab7cdc331b41044711bcd8a65 (diff)
downloadcpython-791f7d4783a732720f9fdcd39f530267efc9e4df.zip
cpython-791f7d4783a732720f9fdcd39f530267efc9e4df.tar.gz
cpython-791f7d4783a732720f9fdcd39f530267efc9e4df.tar.bz2
Added ismount().
Fixes #661762, bugfix candidate.
Diffstat (limited to 'Lib/macpath.py')
-rw-r--r--Lib/macpath.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index e3145da..8cebc08 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -84,6 +84,11 @@ def splitdrive(p):
def dirname(s): return split(s)[0]
def basename(s): return split(s)[1]
+def ismount(s):
+ if not isabs(s):
+ return False
+ components = split(s)
+ return len(components) == 2 and components[1] == ''
def isdir(s):
"""Return true if the pathname refers to an existing directory."""