You are here

public function TempFileManager::create in Backup and Migrate 8.4

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

BackupFileWritableInterface

Overrides TempFileManagerInterface::create

File

lib/backup_migrate_core/src/File/TempFileManager.php, line 35

Class

TempFileManager
Class TempFileManager.

Namespace

BackupMigrate\Core\File

Code

public function create($ext = '') {
  $file = new WritableStreamBackupFile($this->adapter
    ->createTempFile($ext));
  $file
    ->setExtList(explode('.', $ext));
  return $file;
}