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

Method is_dir

Lib/pathlib/_os.py:413–425  ·  view source on GitHub ↗

Whether this path is a directory.

(self, *, follow_symlinks=True)

Source from the content-addressed store, hash-verified

411 return False
412
413 def is_dir(self, *, follow_symlinks=True):
414 """Whether this path is a directory."""
415 if not follow_symlinks and self.is_symlink():
416 return False
417 try:
418 return self._is_dir
419 except AttributeError:
420 if os.path.isdir(self._path):
421 self._is_dir = self._exists = True
422 return True
423 else:
424 self._is_dir = False
425 return False
426
427 def is_file(self, *, follow_symlinks=True):
428 """Whether this path is a regular file."""

Callers

nothing calls this directly

Calls 2

is_symlinkMethod · 0.95
isdirMethod · 0.45

Tested by

no test coverage detected