Exemplo n.º 1
0
 /**
  * Previously in t3lib_extFileFunc::deleteFile()
  *
  * @param $fileObject \TYPO3\CMS\Core\Resource\FileInterface
  * @return bool TRUE if deletion succeeded
  */
 public function deleteFile($fileObject)
 {
     if (!$this->checkFileActionPermission('remove', $fileObject)) {
         throw new \TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException('You are not allowed to delete the file "' . $fileObject->getIdentifier() . '\'', 1319550425);
     }
     $result = $this->driver->deleteFile($fileObject);
     if ($result === FALSE) {
         throw new \TYPO3\CMS\Core\Resource\Exception\FileOperationErrorException('Deleting the file "' . $fileObject->getIdentifier() . '\' failed.', 1329831691);
     }
     // Mark the file object as deleted
     $fileObject->setDeleted();
     return TRUE;
 }