MCPcopy Index your code
hub / github.com/python/cpython / is_dir

Method is_dir

Lib/test/test_pathlib/support/local_path.py:114–120  ·  view source on GitHub ↗

Whether this path is a directory.

(self, *, follow_symlinks=True)

Source from the content-addressed store, hash-verified

112 return self._exists
113
114 def is_dir(self, *, follow_symlinks=True):
115 """Whether this path is a directory."""
116 if not follow_symlinks and self.is_symlink():
117 return False
118 if self._is_dir is None:
119 self._is_dir = os.path.isdir(self._path)
120 return self._is_dir
121
122 def is_file(self, *, follow_symlinks=True):
123 """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