Whether this path is a regular file (also True for symlinks pointing to regular files).
(self)
| 1259 | return False |
| 1260 | |
| 1261 | def is_file(self): |
| 1262 | """ |
| 1263 | Whether this path is a regular file (also True for symlinks pointing |
| 1264 | to regular files). |
| 1265 | """ |
| 1266 | try: |
| 1267 | return S_ISREG(self.stat().st_mode) |
| 1268 | except OSError as e: |
| 1269 | if not _ignore_error(e): |
| 1270 | raise |
| 1271 | # Path doesn't exist or is a broken symlink |
| 1272 | # (see http://web.archive.org/web/20200623061726/https://bitbucket.org/pitrou/pathlib/issues/12/ ) |
| 1273 | return False |
| 1274 | except ValueError: |
| 1275 | # Non-encodable path |
| 1276 | return False |
| 1277 | |
| 1278 | def is_mount(self): |
| 1279 | """ |
no test coverage detected