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