diff options
Diffstat (limited to 'Lib/ntpath.py')
| -rw-r--r-- | Lib/ntpath.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index ec8a7ab..826be87 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -672,3 +672,14 @@ except ImportError: def sameopenfile(f1, f2): """Test whether two file objects reference the same file""" return _getfileinformation(f1) == _getfileinformation(f2) + + +try: + # The genericpath.isdir implementation uses os.stat and checks the mode + # attribute to tell whether or not the path is a directory. + # This is overkill on Windows - just pass the path to GetFileAttributes + # and check the attribute from there. + from nt import _isdir as isdir +except ImportError: + # Use genericpath.isdir as imported above. + pass |
