Whether this path is a regular file.
(self, *, follow_symlinks=True)
| 425 | return False |
| 426 | |
| 427 | def is_file(self, *, follow_symlinks=True): |
| 428 | """Whether this path is a regular file.""" |
| 429 | if not follow_symlinks and self.is_symlink(): |
| 430 | return False |
| 431 | try: |
| 432 | return self._is_file |
| 433 | except AttributeError: |
| 434 | if os.path.isfile(self._path): |
| 435 | self._is_file = self._exists = True |
| 436 | return True |
| 437 | else: |
| 438 | self._is_file = False |
| 439 | return False |
| 440 | |
| 441 | def is_symlink(self): |
| 442 | """Whether this path is a symbolic link.""" |
nothing calls this directly
no test coverage detected