ID EN
OS

is_dir

Python 3.11

Return True if this entry is a directory or a symbolic link pointing to a directory; return False if the entry is or points to any other kind of file, or if it doesn’t exist anymore.

Syntax

PYTHON
is_dir(*, follow_symlinks=True)

See Also

os.stat() stat.S_ISDIR() OSError PermissionError FileNotFoundError