/** * @param EntityInterface $entity */ protected function removeOldFiles(EntityInterface $entity) { $root = $this->root . $entity->getDownloadPath() . '/'; foreach ($entity->getOldFilenames() as $filename) { $this->fs->remove($root . $filename); } }