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

Function islink

Lib/genericpath.py:60–66  ·  view source on GitHub ↗

Test whether a path is a symbolic link

(path)

Source from the content-addressed store, hash-verified

58# This will always return false on systems where os.lstat doesn't exist.
59
60def islink(path):
61 """Test whether a path is a symbolic link"""
62 try:
63 st = os.lstat(path)
64 except (OSError, ValueError, AttributeError):
65 return False
66 return stat.S_ISLNK(st.st_mode)
67
68
69# Is a path a junction?

Callers 2

walkFunction · 0.85
_readlink_deepFunction · 0.85

Calls 1

lstatMethod · 0.80

Tested by

no test coverage detected