On this page
posixpath.samestat
Prev: posixpath.sameopenfile | Up: posixpath | Next: posixpath.split
Rel: posixpath.abspath, posixpath.basename, posixpath.commonpath, posixpath.commonprefix
Ref: docs.python.org — posixpath.samestat
Tags: #public #python3 #stdlib #posixpath
Import
import posixpath
from posixpath import samestat
Signature & Overview
posixpath.samestat(s1, s2)
Test whether two stat buffers reference the same file
Usage
import posixpath, os
s = os.stat('.')
assert posixpath.samestat(s, s) is True
Gotchas
- Compares two
os.stat_resultobjects directly.
REPL Inspect
from posixpath import samestat
help(samestat)
Linked from
Related notes
- tuts/python3/stdlib_module/posixpath/sameopenfile Linked here; links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/split Linked here; links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/posixpath/abspath Linked here; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/basename Linked here; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/commonpath Linked here; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/commonprefix Linked here; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/dirname shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/exists shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/expanduser shared tags: #posixpath, #stdlib