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

Method is_file

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

Source from the content-addressed store, hash-verified

142 return self.zip_info.filename.endswith('/')
143
144 def is_file(self, follow_symlinks=True):
145 if follow_symlinks and self.is_symlink():
146 return self.resolve().is_file()
147 elif self.zip_info is None:
148 return False
149 elif fmt := S_IFMT(self.zip_info.external_attr >> 16):
150 return S_ISREG(fmt)
151 else:
152 return not self.zip_info.filename.endswith('/')
153
154 def is_symlink(self):
155 if self.zip_info is None:

Callers 15

find_pyMethod · 0.45
check_entryMethod · 0.45
test_removed_dirMethod · 0.45
test_removed_fileMethod · 0.45
test_broken_symlinkMethod · 0.45
test_create_archiveMethod · 0.45
test_cmdline_createMethod · 0.45
test_cmdline_copyMethod · 0.45

Calls 5

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

Tested by 15

find_pyMethod · 0.36
check_entryMethod · 0.36
test_removed_dirMethod · 0.36
test_removed_fileMethod · 0.36
test_broken_symlinkMethod · 0.36
test_create_archiveMethod · 0.36
test_cmdline_createMethod · 0.36
test_cmdline_copyMethod · 0.36