How to Check if product has links_exist attribute in Magento 2?

Attribute code links_exist is available for the only Downloadable Product type in Magento 2.

You can verify if the product has links exists or not programmatically by the class, Magento\Downloadable\Model\Product\Type

Using Model class, create simple function to check links exist for the given product by $product->getData(‘links_exist’)

Call method from the PHP class,

hasLinks() used for the check product type has links exists or not.
links_exist attribute code will be available for only Downloadable products.