Return whether other_path is the same or not as this file (as returned by os.path.samefile()).
(self, other_path)
| 749 | return False |
| 750 | |
| 751 | def samefile(self, other_path): |
| 752 | """Return whether other_path is the same or not as this file |
| 753 | (as returned by os.path.samefile()). |
| 754 | """ |
| 755 | st = self.stat() |
| 756 | try: |
| 757 | other_st = other_path.stat() |
| 758 | except AttributeError: |
| 759 | other_st = self.with_segments(other_path).stat() |
| 760 | return (st.st_ino == other_st.st_ino and |
| 761 | st.st_dev == other_st.st_dev) |
| 762 | |
| 763 | def open(self, mode='r', buffering=-1, encoding=None, |
| 764 | errors=None, newline=None): |