Whether this path is a directory.
(self)
| 1243 | return True |
| 1244 | |
| 1245 | def is_dir(self): |
| 1246 | """ |
| 1247 | Whether this path is a directory. |
| 1248 | """ |
| 1249 | try: |
| 1250 | return S_ISDIR(self.stat().st_mode) |
| 1251 | except OSError as e: |
| 1252 | if not _ignore_error(e): |
| 1253 | raise |
| 1254 | # Path doesn't exist or is a broken symlink |
| 1255 | # (see http://web.archive.org/web/20200623061726/https://bitbucket.org/pitrou/pathlib/issues/12/ ) |
| 1256 | return False |
| 1257 | except ValueError: |
| 1258 | # Non-encodable path |
| 1259 | return False |
| 1260 | |
| 1261 | def is_file(self): |
| 1262 | """ |
no test coverage detected