We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ff7dd6 commit a49f203Copy full SHA for a49f203
Lib/genericpath.py
@@ -92,7 +92,11 @@ def samestat(s1, s2):
92
93
# Are two filenames really pointing to the same file?
94
def samefile(f1, f2):
95
- """Test whether two pathnames reference the same actual file"""
+ """Test whether two pathnames reference the same actual file or directory
96
+
97
+ This is determined by the device number and i-node number and
98
+ raises an exception if an os.stat() call on either pathname fails.
99
+ """
100
s1 = os.stat(f1)
101
s2 = os.stat(f2)
102
return samestat(s1, s2)
0 commit comments