MCPcopy Index your code
hub / github.com/python/cpython / is_hardlink

Function is_hardlink

Lib/test/test_compileall.py:51–55  ·  view source on GitHub ↗

Returns True if two files have the same inode (hardlink)

(filename1, filename2)

Source from the content-addressed store, hash-verified

49
50
51def is_hardlink(filename1, filename2):
52 """Returns True if two files have the same inode (hardlink)"""
53 inode1 = os.stat(filename1).st_ino
54 inode2 = os.stat(filename2).st_ino
55 return inode1 == inode2
56
57
58class CompileallTestsBase:

Callers 7

test_hardlinkMethod · 0.85
test_disabledMethod · 0.85
check_hardlinksMethod · 0.85
test_only_two_levelsMethod · 0.85
test_recompilationMethod · 0.85
test_importMethod · 0.85

Calls 1

statMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…