Whether this path is a directory.
(self, *, follow_symlinks=True)
| 672 | return os.path.lexists(self) |
| 673 | |
| 674 | def is_dir(self, *, follow_symlinks=True): |
| 675 | """ |
| 676 | Whether this path is a directory. |
| 677 | """ |
| 678 | if follow_symlinks: |
| 679 | return os.path.isdir(self) |
| 680 | try: |
| 681 | return S_ISDIR(self.stat(follow_symlinks=follow_symlinks).st_mode) |
| 682 | except (OSError, ValueError): |
| 683 | return False |
| 684 | |
| 685 | def is_file(self, *, follow_symlinks=True): |
| 686 | """ |