public function TempFileManager::create in Backup and Migrate 5.0.x
Create a brand new temp file with the given extension (if specified).
The new file should be writable.
Parameters
string $ext: The file extension for this file (optional)
Return value
Overrides TempFileManagerInterface::create
File
- src/
Core/ File/ TempFileManager.php, line 38
Class
- TempFileManager
- @package Drupal\backup_migrate\Core\Services
Namespace
Drupal\backup_migrate\Core\FileCode
public function create($ext = '') {
$file = new WritableStreamBackupFile($this->adapter
->createTempFile($ext));
$file
->setExtList(explode('.', $ext));
return $file;
}