Test whether two paths reference the same actual file or directory. Unlike Path.samefile(), does not resolve symlinks.
(p1: Path, p2: Path)
| 1047 | |
| 1048 | |
| 1049 | def samefile_nofollow(p1: Path, p2: Path) -> bool: |
| 1050 | class="st">"""Test whether two paths reference the same actual file or directory. |
| 1051 | |
| 1052 | Unlike Path.samefile(), does not resolve symlinks. |
| 1053 | class="st">""" |
| 1054 | return os.path.samestat(p1.lstat(), p2.lstat()) |