MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / lexists

Function lexists

tools/python-3.11.9-amd64/Lib/posixpath.py:174–180  ·  view source on GitHub ↗

Test whether a path exists. Returns True for broken symbolic links

(path)

Source from the content-addressed store, hash-verified

172# Being true for dangling symbolic links is also useful.
173
174def lexists(path):
175 """Test whether a path exists. Returns True for broken symbolic links"""
176 try:
177 os.lstat(path)
178 except (OSError, ValueError):
179 return False
180 return True
181
182
183# Is a path a mount point?

Callers

nothing calls this directly

Calls 1

lstatMethod · 0.80

Tested by

no test coverage detected