From: Jack Jansen Date: Wed, 15 Jan 2003 22:45:48 +0000 (+0000) Subject: Added ismount(). X-Git-Tag: v2.3c1~2445 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=791f7d4783a732720f9fdcd39f530267efc9e4df;p=python Added ismount(). Fixes #661762, bugfix candidate. --- diff --git a/Lib/macpath.py b/Lib/macpath.py index e3145da129..8cebc087a3 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."""