PyDocs

Nav

File and Directory Access

Path.samefile

pathlib

method of Path · Added in 3.5 (source)
  • Path.samefile(other_path)
Return whether other_path is the same or not as this file
(as returned by os.path.samefile()).
1 Example
>>> p = Path('spam')
>>> q = Path('eggs')
>>> p.samefile(q)
False
>>> p.samefile('spam')
True
from the Python docs
See Also
No see-alsos for pathlib/Path.samefile
0 Notes
No notes for Path.samefile