diff options
| author | Brian Curtin <brian@python.org> | 2011-06-13 21:10:32 (GMT) |
|---|---|---|
| committer | Brian Curtin <brian@python.org> | 2011-06-13 21:10:32 (GMT) |
| commit | a87d586fd6c4a5dfe4ea89fda288ae8eb66b0134 (patch) | |
| tree | 420fe483c679d2225cc8bd82eefaecf783999268 /Lib/ntpath.py | |
| parent | d25aef55c8b0025dd2ee7de11b526f34ceed6b66 (diff) | |
| parent | cdc751720ee7a13ac163da1eedf3a513386c98d4 (diff) | |
| download | cpython-a87d586fd6c4a5dfe4ea89fda288ae8eb66b0134.zip cpython-a87d586fd6c4a5dfe4ea89fda288ae8eb66b0134.tar.gz cpython-a87d586fd6c4a5dfe4ea89fda288ae8eb66b0134.tar.bz2 | |
branch merge?
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 |
