def islink(path):
if platform.system() == "<STR_LIT>":<EOL><INDENT>if sys.version_info[:<NUM_LIT:2>] < (<NUM_LIT:3>, <NUM_LIT:5>):<EOL><INDENT>try:<EOL><INDENT>attrs = ctypes.windll.kernel32.GetFileAttributesW(unicode(path))  <EOL>assert attrs != -<NUM_LIT:1><EOL>return bool(attrs & FILE_ATTRIBUTE_REPARSE_POINT)<EOL><DEDENT>except (AttributeError, AssertionError):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>try:<EOL><INDENT>st = os.lstat(path)  <EOL><DEDENT>except (OSError, AttributeError):<EOL><INDENT>return False<EOL><DEDENT>return stat.S_ISLNK(st.st_mode) or st.st_file_attributes & stat.FILE_ATTRIBUTE_REPARSE_POINT<EOL><DEDENT>return os.path.islink(path)<EOL>
os.path.islink() but return True for junction points on Windows.