I have created a custom module in which I want to check if a (image)file exists in my
I have checked this answer but in only shows how to get Magento's directory paths.
How can I get full path for my module's directory which will support with Magento 2's static content deploy feature?
As per Rakesh's answer I can use below code.
$mediapath = $this->_filesystem->getDirectoryRead(DirectoryList::APP)->getAbsolutePath(); $modulePath = echo $mediapath.'code/Packagename/Modulename/view/frontend/web/images';
Is there any other alternative to this approach?