On this page
posixpath.lexists
Prev: posixpath.join | Up: posixpath | Next: posixpath.normcase
Rel: posixpath.abspath, posixpath.basename, posixpath.commonpath, posixpath.commonprefix
Ref: docs.python.org — posixpath.lexists
Tags: #public #python3 #stdlib #posixpath
Import
import posixpath
from posixpath import lexists
Signature & Overview
posixpath.lexists(path)
Test whether a path exists. Returns True for broken symbolic links
Usage
import posixpath
assert posixpath.lexists('.') is True
Gotchas
- Returns
Truefor broken symlinks too (useslstat).
REPL Inspect
from posixpath import lexists
help(lexists)
Linked from
Related notes
- tuts/python3/stdlib_module/posixpath/join Linked here; links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/normcase 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