Return the status as an os.stat_result.
(self, *, follow_symlinks=True)
| 631 | return f"<{path_type}.info>" |
| 632 | |
| 633 | def _stat(self, *, follow_symlinks=True): |
| 634 | """Return the status as an os.stat_result.""" |
| 635 | if self._entry: |
| 636 | return self._entry.stat(follow_symlinks=follow_symlinks) |
| 637 | if follow_symlinks: |
| 638 | if not self._stat_result: |
| 639 | try: |
| 640 | self._stat_result = os.stat(self._path) |
| 641 | except (OSError, ValueError): |
| 642 | self._stat_result = _STAT_RESULT_ERROR |
| 643 | raise |
| 644 | return self._stat_result |
| 645 | else: |
| 646 | if not self._lstat_result: |
| 647 | try: |
| 648 | self._lstat_result = os.lstat(self._path) |
| 649 | except (OSError, ValueError): |
| 650 | self._lstat_result = _STAT_RESULT_ERROR |
| 651 | raise |
| 652 | return self._lstat_result |
| 653 | |
| 654 | def exists(self, *, follow_symlinks=True): |
| 655 | """Whether this path exists.""" |
no test coverage detected