MediaWiki
REL1_24
|
This class is used to hold the location and do limited manipulation of files stored temporarily (this will be whatever wfTempDir() returns) More...
Public Member Functions | |
__construct ($path) | |
Sets up the file object. | |
__destruct () | |
Cleans up after the temporary file by deleting it. | |
autocollect () | |
Set flag clean up after the temporary file. | |
bind ($object) | |
Clean up the temporary file only after an object goes out of scope. | |
preserve () | |
Set flag to not clean up after the temporary file. | |
purge () | |
Purge this file off the file system. | |
Static Public Member Functions | |
static | factory ($prefix, $extension= '') |
Make a new temporary file on the file system. | |
static | purgeAllOnShutdown () |
Try to make sure that all files are purged on error. | |
Protected Attributes | |
bool | $canDelete = false |
Garbage collect the temp file *. | |
Static Protected Attributes | |
static | $instances = array() |
static | $pathsCollect = null |
This class is used to hold the location and do limited manipulation of files stored temporarily (this will be whatever wfTempDir() returns)
Definition at line 30 of file TempFSFile.php.
TempFSFile::__construct | ( | $ | path | ) |
Sets up the file object.
string | $path | Path to temporary file on local disk |
Reimplemented from FSFile.
Definition at line 39 of file TempFSFile.php.
References FSFile\$path, and array().
Cleans up after the temporary file by deleting it.
Definition at line 158 of file TempFSFile.php.
Set flag clean up after the temporary file.
Definition at line 134 of file TempFSFile.php.
TempFSFile::bind | ( | $ | object | ) |
Clean up the temporary file only after an object goes out of scope.
stdClass | $object |
Definition at line 104 of file TempFSFile.php.
static TempFSFile::factory | ( | $ | prefix, |
$ | extension = '' |
||
) | [static] |
Make a new temporary file on the file system.
Temporary files may be purged when the file object falls out of scope.
string | $prefix | |
string | $extension |
Definition at line 56 of file TempFSFile.php.
Referenced by MemoryFileBackend\doGetLocalCopyMulti(), ApiImageRotate\execute(), and UploadFromUrl\makeTemporaryFile().
Set flag to not clean up after the temporary file.
Definition at line 121 of file TempFSFile.php.
Purge this file off the file system.
Definition at line 87 of file TempFSFile.php.
static TempFSFile::purgeAllOnShutdown | ( | ) | [static] |
Try to make sure that all files are purged on error.
This method should only be called internally
Definition at line 147 of file TempFSFile.php.
bool TempFSFile::$canDelete = false [protected] |
Garbage collect the temp file *.
Definition at line 31 of file TempFSFile.php.
TempFSFile::$instances = array() [static, protected] |
Definition at line 34 of file TempFSFile.php.
TempFSFile::$pathsCollect = null [static, protected] |
Definition at line 37 of file TempFSFile.php.