mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
bpo-30974: Change os.path.samefile docstring to match docs (GH-7337)
(cherry picked from commit 8e568ef266
)
Co-authored-by: Timo Furrer <tuxtimo@gmail.com>
This commit is contained in:
parent
79af3bd1d1
commit
6b833901fe
1 changed files with 5 additions and 1 deletions
|
@ -92,7 +92,11 @@ def samestat(s1, s2):
|
||||||
|
|
||||||
# Are two filenames really pointing to the same file?
|
# Are two filenames really pointing to the same file?
|
||||||
def samefile(f1, f2):
|
def samefile(f1, f2):
|
||||||
"""Test whether two pathnames reference the same actual file"""
|
"""Test whether two pathnames reference the same actual file or directory
|
||||||
|
|
||||||
|
This is determined by the device number and i-node number and
|
||||||
|
raises an exception if an os.stat() call on either pathname fails.
|
||||||
|
"""
|
||||||
s1 = os.stat(f1)
|
s1 = os.stat(f1)
|
||||||
s2 = os.stat(f2)
|
s2 = os.stat(f2)
|
||||||
return samestat(s1, s2)
|
return samestat(s1, s2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue