ID EN
OS Path

isdir

Python 3.11

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

Syntax

PYTHON
os.path.isdir(path)

See Also

existing islink() isdir() path-like object