Thanks to visit codestin.com Credit goes to github.com
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 7ea9a85 commit 8e568efCopy full SHA for 8e568ef
1 file changed
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