On this page
genericpath.isdir
Prev: genericpath.isdevdrive | Up: genericpath | Next: genericpath.isfile
Rel: genericpath.commonprefix, genericpath.exists, genericpath.getatime, genericpath.getctime
Ref: docs.python.org — genericpath.isdir
Tags: #public #python3 #stdlib #genericpath
Import
import genericpath
from genericpath import isdir
Signature & Overview
genericpath.isdir(s)
Return true if the pathname refers to an existing directory.
Usage
import os
assert os.path.isdir(".") is True
Gotchas
- Follows symlinks: Returns
Truefor a symlink pointing to an existing directory.
REPL Inspect
from genericpath import isdir
help(isdir)
Linked from
Related notes
- tuts/python3/stdlib_module/genericpath/isdevdrive Linked here; links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/isfile Linked here; links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/genericpath/commonprefix Linked here; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/exists Linked here; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/getatime Linked here; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/getctime Linked here; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/getmtime shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/getsize shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/isjunction shared tags: #genericpath, #stdlib