public function DrupalTempFileAdapter::deleteTempFile in Backup and Migrate 8.4
Delete a temporary file.
Parameters
string $filename The path to the file.:
Overrides TempFileAdapter::deleteTempFile
File
- src/
File/ DrupalTempFileAdapter.php, line 59
Class
- DrupalTempFileAdapter
- Class DrupalTempFileAdapter.
Namespace
BackupMigrate\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.');
}
}
}
}