mirror of
https://github.com/python/cpython.git
synced 2025-08-18 07:41:05 +00:00
Merge
This commit is contained in:
parent
ce5493f33d
commit
caea7e8d23
3 changed files with 51 additions and 0 deletions
|
@ -521,3 +521,15 @@ def relpath(path, start=curdir):
|
|||
if not rel_list:
|
||||
return curdir
|
||||
return join(*rel_list)
|
||||
|
||||
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
|
||||
except ImportError:
|
||||
from genericpath import isdir as _isdir
|
||||
|
||||
def isdir(path):
|
||||
return _isdir(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue