Whether this path is a regular file (also True for symlinks pointing to regular files).
(self, *, follow_symlinks=True)
| 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 | """ |