Whether this path is a directory.
(self, *, follow_symlinks=True)
| 870 | return os.path.lexists(self) |
| 871 | |
| 872 | def is_dir(self, *, follow_symlinks=True): |
| 873 | """ |
| 874 | Whether this path is a directory. |
| 875 | """ |
| 876 | if follow_symlinks: |
| 877 | return os.path.isdir(self) |
| 878 | try: |
| 879 | return S_ISDIR(self.stat(follow_symlinks=follow_symlinks).st_mode) |
| 880 | except (OSError, ValueError): |
| 881 | return False |
| 882 | |
| 883 | def is_file(self, *, follow_symlinks=True): |
| 884 | """ |