Magento 2, You can check the given folder path contains the file or not using the isFile() method.
For example, You have an image inside the pub/media folder with path,
$imagePath = ‘/catalog/product/placeholder/default/coming-soon.jpg’;
You can see a placeholder image at the above location in the media folder. Continue reading “How to check given folder contains Files in Magento 2?”