Return whether other_path is the same or not as this file (as returned by os.path.samefile()).
(self, other_path)
| 947 | return False |
| 948 | |
| 949 | def samefile(self, other_path): |
| 950 | """Return whether other_path is the same or not as this file |
| 951 | (as returned by os.path.samefile()). |
| 952 | """ |
| 953 | st = self.stat() |
| 954 | try: |
| 955 | other_st = other_path.stat() |
| 956 | except AttributeError: |
| 957 | other_st = self.with_segments(other_path).stat() |
| 958 | return (st.st_ino == other_st.st_ino and |
| 959 | st.st_dev == other_st.st_dev) |
| 960 | |
| 961 | def open(self, mode='r', buffering=-1, encoding=None, |
| 962 | errors=None, newline=None): |