MCPcopy Index your code
hub / github.com/RustPython/RustPython / samefile

Method samefile

Lib/pathlib/__init__.py:751–761  ·  view source on GitHub ↗

Return whether other_path is the same or not as this file (as returned by os.path.samefile()).

(self, other_path)

Source from the content-addressed store, hash-verified

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):

Callers 15

mainFunction · 0.80
_get_revised_pathFunction · 0.80
_samefileFunction · 0.80
test_samefileMethod · 0.80
test_path_samefileMethod · 0.80
test_move_dir_symlinkMethod · 0.80
test_29248Method · 0.80
expect_fileMethod · 0.80

Calls 2

statMethod · 0.95
with_segmentsMethod · 0.45

Tested by 12

test_samefileMethod · 0.64
test_path_samefileMethod · 0.64
test_move_dir_symlinkMethod · 0.64
test_29248Method · 0.64
expect_fileMethod · 0.64
test_hardlink_toMethod · 0.64
test_samefileMethod · 0.64