ID EN
OS Path

isfile

Python 3.11

Return True if path is an existing regular file. This follows symbolic links, so both islink() and isfile() can be true for the same path.

Syntax

PYTHON
os.path.isfile(path)

See Also

existing islink() isfile() path-like object