MCPcopy Index your code
hub / github.com/RustPython/RustPython / _isdir

Function _isdir

Lib/glob.py:219–228  ·  view source on GitHub ↗
(pathname, dir_fd)

Source from the content-addressed store, hash-verified

217 return True
218
219def _isdir(pathname, dir_fd):
220 # Same as os.path.isdir(), but with dir_fd
221 if dir_fd is None:
222 return os.path.isdir(pathname)
223 try:
224 st = os.stat(pathname, dir_fd=dir_fd)
225 except (OSError, ValueError):
226 return False
227 else:
228 return stat.S_ISDIR(st.st_mode)
229
230def _join(dirname, basename):
231 # It is common if dirname or basename is empty

Callers 3

_iglobFunction · 0.85
_glob0Function · 0.85
_glob2Function · 0.85

Calls 2

isdirMethod · 0.45
statMethod · 0.45

Tested by

no test coverage detected