public function DrupalTempFileAdapter::deleteTempFile in Backup and Migrate 5.0.x
Delete a temporary file.
Parameters
string $filename: The path to the file.
Overrides TempFileAdapter::deleteTempFile
File
- src/
Drupal/ File/ DrupalTempFileAdapter.php, line 59
Class
- DrupalTempFileAdapter
- @package Drupal\backup_migrate\Drupal\File
Namespace
Drupal\backup_migrate\Drupal\FileCode
public function deleteTempFile($filename) {
// Only delete files that were created by this manager.
if (in_array($filename, $this->tempfiles)) {
if (file_exists($filename)) {
if (!$this->filesystem
->unlink($filename)) {
throw new \Exception('Could not delete a temporary file.');
}
}
}
}