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

Function lexists

tools/python-3.11.9-amd64/Lib/ntpath.py:268–274  ·  view source on GitHub ↗

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

(path)

Source from the content-addressed store, hash-verified

266# Being true for dangling symbolic links is also useful.
267
268def lexists(path):
269 """Test whether a path exists. Returns True for broken symbolic links"""
270 try:
271 st = os.lstat(path)
272 except (OSError, ValueError):
273 return False
274 return True
275
276# Is a path a mount point?
277# Any drive letter root (eg c:\)

Callers

nothing calls this directly

Calls 1

lstatMethod · 0.80

Tested by

no test coverage detected