In this post I am going to explain how to check file exists in directory using isExists method in magento 2. Use below code snippet to check file is exists or not. private $_fileDriver; public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Framework\Filesystem\Driver\File $fileDriver, array $data = [] ) { $this->_fileDriver = $fileDriver; parent::__construct($context, $data); } public function…


Recent Comments