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

Method is_dir

Lib/pathlib/__init__.py:674–683  ·  view source on GitHub ↗

Whether this path is a directory.

(self, *, follow_symlinks=True)

Source from the content-addressed store, hash-verified

672 return os.path.lexists(self)
673
674 def is_dir(self, *, follow_symlinks=True):
675 """
676 Whether this path is a directory.
677 """
678 if follow_symlinks:
679 return os.path.isdir(self)
680 try:
681 return S_ISDIR(self.stat(follow_symlinks=follow_symlinks).st_mode)
682 except (OSError, ValueError):
683 return False
684
685 def is_file(self, *, follow_symlinks=True):
686 """

Callers 15

mkdirMethod · 0.95
_deleteMethod · 0.95
expect_fileMethod · 0.95
walkFunction · 0.45
_fwalkFunction · 0.45
_copytreeFunction · 0.45
_rmtree_safe_fd_stepFunction · 0.45
_iterdirFunction · 0.45
select_wildcardMethod · 0.45
select_recursive_stepMethod · 0.45
_copy_fromMethod · 0.45

Calls 3

statMethod · 0.95
S_ISDIRFunction · 0.90
isdirMethod · 0.45

Tested by 2

expect_fileMethod · 0.76