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