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

Method is_file

Lib/pathlib/_os.py:469–474  ·  view source on GitHub ↗

Whether this path is a regular file.

(self, *, follow_symlinks=True)

Source from the content-addressed store, hash-verified

467 return S_ISDIR(st.st_mode)
468
469 def is_file(self, *, follow_symlinks=True):
470 """Whether this path is a regular file."""
471 st = self._stat(follow_symlinks=follow_symlinks, ignore_errors=True)
472 if st is None:
473 return False
474 return S_ISREG(st.st_mode)
475
476 def is_symlink(self):
477 """Whether this path is a symbolic link."""

Callers

nothing calls this directly

Calls 2

S_ISREGFunction · 0.90
_statMethod · 0.45

Tested by

no test coverage detected