On this page
  1. genericpath.samestat
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

genericpath.samestat

Prev: genericpath.sameopenfile | Up: genericpath
Rel: genericpath.commonprefix, genericpath.exists, genericpath.getatime, genericpath.getctime
Ref: docs.python.org — genericpath.samestat
Tags: #public #python3 #stdlib #genericpath


Import

import genericpath
from genericpath import samestat

Signature & Overview

genericpath.samestat(s1, s2)

Test whether two stat buffers reference the same file

Usage

import os

s1, s2 = os.stat("."), os.stat(os.path.abspath("."))
assert os.path.samestat(s1, s2) is True

Gotchas

REPL Inspect

from genericpath import samestat
help(samestat)

Linked from

Related notes