/** * Remove a file * @param \Elorfin\ResourceBundle\Entity\File $file */ public function remove(File $file) { if (null !== $file->getPath()) { $fullPath = $this->getRealPath() . $file->getFilename(); if (file_exists($fullPath)) { unlink($fullPath); } } }