On this page
ntpath.isfile
Prev: ntpath.isdir | Up: ntpath | Next: ntpath.isjunction
Rel: ntpath.abspath, ntpath.basename, ntpath.commonpath, ntpath.commonprefix
Ref: docs.python.org — ntpath.isfile
Tags: #public #python3 #stdlib #ntpath
Import
import ntpath
from ntpath import isfile
Signature & Overview
ntpath.isfile(path)
Test whether a path is a regular file
Usage
import ntpath
assert ntpath.isfile('.') is False
Gotchas
- Follows symlinks; prefer
Path.is_file().
REPL Inspect
from ntpath import isfile
help(isfile)
Linked from
Related notes
- tuts/python3/stdlib_module/ntpath/isdir Linked here; links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/isjunction Linked here; links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ntpath/abspath Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/basename Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/commonpath Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/commonprefix Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/dirname shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/exists shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/expanduser shared tags: #ntpath, #stdlib