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

ntpath.samefile

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


Import

import ntpath
from ntpath import samefile

Signature & Overview

ntpath.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 ntpath

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

Gotchas

REPL Inspect

from ntpath import samefile
help(samefile)

Linked from

Related notes