def islink(path):
    """os.path.islink() but return True for junction points on Windows.
    """
    if platform.system() == "Windows":
        if sys.version_info[:2] < (3, 5):
            try:
                # pylint: disable=undefined-variable
                attrs = ctypes.windll.kernel32.GetFileAttributesW(unicode(path))  # noqa
                assert attrs != -1
                return bool(attrs & FILE_ATTRIBUTE_REPARSE_POINT)
            except (AttributeError, AssertionError):
                return False
        try:
            st = os.lstat(path)  # pylint: disable=invalid-name
        except (OSError, AttributeError):
            return False
        # pylint: disable=no-member
        return stat.S_ISLNK(st.st_mode) or st.st_file_attributes & stat.FILE_ATTRIBUTE_REPARSE_POINT
    return os.path.islink(path)
os.path.islink() but return True for junction points on Windows.