On this page
posixpath.exists
Prev: posixpath.dirname | Up: posixpath | Next: posixpath.expanduser
Rel: posixpath.abspath, posixpath.basename, posixpath.commonpath, posixpath.commonprefix
Ref: docs.python.org — posixpath.exists
Tags: #public #python3 #stdlib #posixpath
Import
import posixpath
from posixpath import exists
Signature & Overview
posixpath.exists(path)
Test whether a path exists. Returns False for broken symbolic links
Usage
import posixpath
assert posixpath.exists('.') is True
Gotchas
- Queries the host OS: Prefer
os.path.exists()orPath.exists().
REPL Inspect
from posixpath import exists
help(exists)
Linked from
Related notes
- tuts/python3/stdlib_module/posixpath/dirname Linked here; links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/expanduser 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/expandvars shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/getatime shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/getctime shared tags: #posixpath, #stdlib