MediaWiki  1.34.0
MediaWiki\FileBackend\FSFile\TempFSFileFactory Class Reference

Public Member Functions

 __construct ( $tmpDirectory=null)
 
 newTempFSFile ( $prefix, $extension='')
 Make a new temporary file on the file system. More...
 

Private Attributes

string null $tmpDirectory
 

Detailed Description

Definition at line 10 of file TempFSFileFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\FileBackend\FSFile\TempFSFileFactory::__construct (   $tmpDirectory = null)
Parameters
string | null$tmpDirectoryA directory to put the temporary files in, e.g., $wgTmpDirectory. If null, we'll try to find one ourselves.

Definition at line 18 of file TempFSFileFactory.php.

References MediaWiki\FileBackend\FSFile\TempFSFileFactory\$tmpDirectory.

Member Function Documentation

◆ newTempFSFile()

MediaWiki\FileBackend\FSFile\TempFSFileFactory::newTempFSFile (   $prefix,
  $extension = '' 
)

Make a new temporary file on the file system.

Temporary files may be purged when the file object falls out of scope.

Parameters
string$prefix
string$extensionOptional file extension
Returns
TempFSFile|null

Definition at line 30 of file TempFSFileFactory.php.

References $ext, $path, MediaWiki\FileBackend\FSFile\TempFSFileFactory\$tmpDirectory, and TempFSFile\getUsableTempDirectory().

Member Data Documentation

◆ $tmpDirectory

string null MediaWiki\FileBackend\FSFile\TempFSFileFactory::$tmpDirectory
private

The documentation for this class was generated from the following file: