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

Method is_file

Lib/pathlib/__init__.py:685–695  ·  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

683 return False
684
685 def is_file(self, *, follow_symlinks=True):
686 """
687 Whether this path is a regular file (also True for symlinks pointing
688 to regular files).
689 """
690 if follow_symlinks:
691 return os.path.isfile(self)
692 try:
693 return S_ISREG(self.stat(follow_symlinks=follow_symlinks).st_mode)
694 except (OSError, ValueError):
695 return False
696
697 def is_mount(self):
698 """

Callers 15

create_archiveFunction · 0.95
expect_fileMethod · 0.95
stdlib_os.pyFile · 0.45
check_test_completionFunction · 0.45
check_lib_completionFunction · 0.45
find_eq.pyFile · 0.45
collect_original_methodsFunction · 0.45
get_all_testsFunction · 0.45
iter_python_filesFunction · 0.45
get_test_filesFunction · 0.45
compare_pathsFunction · 0.45

Calls 3

statMethod · 0.95
S_ISREGFunction · 0.90
isfileMethod · 0.45

Tested by 1

expect_fileMethod · 0.76