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

Method is_file

Lib/pathlib/__init__.py:883–893  ·  view source on GitHub ↗

Whether this path is a regular file (also True for symlinks pointing to regular files).

(self, *, follow_symlinks=True)

Source from the content-addressed store, hash-verified

881 return False
882
883 def is_file(self, *, follow_symlinks=True):
884 """
885 Whether this path is a regular file (also True for symlinks pointing
886 to regular files).
887 """
888 if follow_symlinks:
889 return os.path.isfile(self)
890 try:
891 return S_ISREG(self.stat(follow_symlinks=follow_symlinks).st_mode)
892 except (OSError, ValueError):
893 return False
894
895 def is_mount(self):
896 """

Callers 15

create_archiveFunction · 0.95
expect_fileMethod · 0.95
build_python_pathFunction · 0.45
downloadFunction · 0.45
validate_emsdk_versionFunction · 0.45
build_python_pathFunction · 0.45
run_emscripten_pythonFunction · 0.45
mainFunction · 0.45
build_python_pathFunction · 0.45
downloadFunction · 0.45
copyFunction · 0.45
_build.pyFile · 0.45

Calls 3

statMethod · 0.95
S_ISREGFunction · 0.90
isfileMethod · 0.45

Tested by 1

expect_fileMethod · 0.76