MCPcopy Index your code
hub / github.com/RustPython/RustPython / _lexists

Function _lexists

Lib/glob.py:208–217  ·  view source on GitHub ↗
(pathname, dir_fd)

Source from the content-addressed store, hash-verified

206
207
208def _lexists(pathname, dir_fd):
209 # Same as os.path.lexists(), but with dir_fd
210 if dir_fd is None:
211 return os.path.lexists(pathname)
212 try:
213 os.lstat(pathname, dir_fd=dir_fd)
214 except (OSError, ValueError):
215 return False
216 else:
217 return True
218
219def _isdir(pathname, dir_fd):
220 # Same as os.path.isdir(), but with dir_fd

Callers 2

_iglobFunction · 0.85
_glob0Function · 0.85

Calls 2

lstatMethod · 0.80
lexistsMethod · 0.45

Tested by

no test coverage detected