-
-
Save MorganRamsay/d0ec2b84345f1eab2e5fbe2fabc414a9 to your computer and use it in GitHub Desktop.
Python 3.6.4 os.path.islink (ntpath.py)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def islink(path): | |
"""Test whether a path is a symbolic link. | |
This will always return false for Windows prior to 6.0. | |
""" | |
try: | |
st = os.lstat(path) | |
except (OSError, AttributeError): | |
return False | |
return stat.S_ISLNK(st.st_mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment