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

Method is_dir

Lib/pathlib/__init__.py:872–881  ·  view source on GitHub ↗

Whether this path is a directory.

(self, *, follow_symlinks=True)

Source from the content-addressed store, hash-verified

870 return os.path.lexists(self)
871
872 def is_dir(self, *, follow_symlinks=True):
873 """
874 Whether this path is a directory.
875 """
876 if follow_symlinks:
877 return os.path.isdir(self)
878 try:
879 return S_ISDIR(self.stat(follow_symlinks=follow_symlinks).st_mode)
880 except (OSError, ValueError):
881 return False
882
883 def is_file(self, *, follow_symlinks=True):
884 """

Callers 15

delete_globFunction · 0.95
mkdirMethod · 0.95
_deleteMethod · 0.95
expect_fileMethod · 0.95
mainFunction · 0.45
packageFunction · 0.45
create_stdlib_zipFunction · 0.45
clone_testbedFunction · 0.45
mainFunction · 0.45
wasi_sdkFunction · 0.45
walkFunction · 0.45

Calls 3

statMethod · 0.95
S_ISDIRFunction · 0.90
isdirMethod · 0.45

Tested by 2

expect_fileMethod · 0.76