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

posixpath.samefile

Prev: posixpath.relpath | Up: posixpath | Next: posixpath.sameopenfile
Rel: posixpath.abspath, posixpath.basename, posixpath.commonpath, posixpath.commonprefix
Ref: docs.python.org — posixpath.samefile
Tags: #public #python3 #stdlib #posixpath


Import

import posixpath
from posixpath import samefile

Signature & Overview

posixpath.samefile(f1, f2)

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.

Usage

import posixpath

assert posixpath.samefile('.', posixpath.abspath('.')) is True

Gotchas

REPL Inspect

from posixpath import samefile
help(samefile)

Linked from

Related notes