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

Method is_dir

Lib/test/test_pathlib/support/zip_path.py:134–142  ·  view source on GitHub ↗
(self, follow_symlinks=True)

Source from the content-addressed store, hash-verified

132 return True
133
134 def is_dir(self, follow_symlinks=True):
135 if follow_symlinks and self.is_symlink():
136 return self.resolve().is_dir()
137 elif self.zip_info is None:
138 return True
139 elif fmt := S_IFMT(self.zip_info.external_attr >> 16):
140 return S_ISDIR(fmt)
141 else:
142 return self.zip_info.filename.endswith('/')
143
144 def is_file(self, follow_symlinks=True):
145 if follow_symlinks and self.is_symlink():

Callers 15

check_entryMethod · 0.45
test_removed_dirMethod · 0.45
test_removed_fileMethod · 0.45
test_broken_symlinkMethod · 0.45
test_is_dirMethod · 0.45
test_spec_path_isMethod · 0.45
test_child_path_isMethod · 0.45
test_orphan_path_isMethod · 0.45
test_is_dirMethod · 0.45
test_is_dirMethod · 0.45

Calls 5

is_symlinkMethod · 0.95
resolveMethod · 0.95
S_IFMTFunction · 0.90
S_ISDIRFunction · 0.90
endswithMethod · 0.45

Tested by 15

check_entryMethod · 0.36
test_removed_dirMethod · 0.36
test_removed_fileMethod · 0.36
test_broken_symlinkMethod · 0.36
test_is_dirMethod · 0.36
test_spec_path_isMethod · 0.36
test_child_path_isMethod · 0.36
test_orphan_path_isMethod · 0.36
test_is_dirMethod · 0.36
test_is_dirMethod · 0.36