On this page
posixpath.isdir
Prev: posixpath.isdevdrive | Up: posixpath | Next: posixpath.isfile
Rel: posixpath.abspath, posixpath.basename, posixpath.commonpath, posixpath.commonprefix
Ref: docs.python.org — posixpath.isdir
Tags: #public #python3 #stdlib #posixpath
Import
import posixpath
from posixpath import isdir
Signature & Overview
posixpath.isdir(s)
Return true if the pathname refers to an existing directory.
Usage
import posixpath
assert posixpath.isdir('.') is True
Gotchas
- Follows symlinks; prefer
Path.is_dir().
REPL Inspect
from posixpath import isdir
help(isdir)
Linked from
Related notes
- tuts/python3/stdlib_module/posixpath/isdevdrive Linked here; links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/isfile 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