Return True if 'other' references the same file as 'self'.
(self, other)
| 583 | return os.fspath(self) > os.fspath(other) |
| 584 | |
| 585 | def samefile(self, other): |
| 586 | class="st">""class="st">"Return True if &class="cm">#x27;other' references the same file as 'self'."class="st">"" |
| 587 | other = os.fspath(other) |
| 588 | if not isabs(other): |
| 589 | other = abspath(other) |
| 590 | if self == other: |
| 591 | return True |
| 592 | if not hasattr(os.path, class="st">"samefile"): |
| 593 | return False |
| 594 | return error.checked_call(os.path.samefile, self.strpath, other) |
| 595 | |
| 596 | def remove(self, rec=1, ignore_errors=False): |
| 597 | class="st">"""Remove a file or directory (or a directory tree if rec=1). |