Ejemplo n.º 1
0
 /**
  * Previously in \TYPO3\CMS\Core\Utility\File\ExtendedFileUtility::deleteFile()
  *
  * @param $fileObject FileInterface
  * @throws Exception\InsufficientFileAccessPermissionsException
  * @throws Exception\FileOperationErrorException
  * @return bool TRUE if deletion succeeded
  */
 public function deleteFile($fileObject)
 {
     $this->assureFileDeletePermissions($fileObject);
     $this->emitPreFileDeleteSignal($fileObject);
     $result = $this->driver->deleteFile($fileObject->getIdentifier());
     if ($result === FALSE) {
         throw new Exception\FileOperationErrorException('Deleting the file "' . $fileObject->getIdentifier() . '\' failed.', 1329831691);
     }
     // Mark the file object as deleted
     if ($fileObject instanceof File) {
         $fileObject->setDeleted();
     }
     $this->emitPostFileDeleteSignal($fileObject);
     return TRUE;
 }