MediaWiki
1.23.2
|
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 | |
__destruct () | |
Cleans up after the temporary file by deleting it. More... | |
autocollect () | |
Set flag clean up after the temporary file. More... | |
bind ( $object) | |
Clean up the temporary file only after an object goes out of scope. More... | |
preserve () | |
Set flag to not clean up after the temporary file. More... | |
purge () | |
Purge this file off the file system. More... | |
Public Member Functions inherited from FSFile | |
__construct ( $path) | |
Sets up the file object. More... | |
exists () | |
Checks if the file exists. More... | |
getMimeType () | |
Guess the MIME type from the file contents alone. More... | |
getPath () | |
Returns the file system path. More... | |
getProps ( $ext=true) | |
Get an associative array containing information about a file with the given storage path. More... | |
getSha1Base36 ( $recache=false) | |
Get a SHA-1 hash of a file in the local filesystem, in base-36 lower case encoding, zero padded to 31 digits. More... | |
getSize () | |
Get the file size in bytes. More... | |
getTimestamp () | |
Get the file's last-modified timestamp. More... | |
Static Public Member Functions | |
static | factory ( $prefix, $extension='') |
Make a new temporary file on the file system. More... | |
Static Public Member Functions inherited from FSFile | |
static | extensionFromPath ( $path) |
Get the final file extension from a file system path. More... | |
static | getPropsFromPath ( $path, $ext=true) |
Get an associative array containing information about a file in the local filesystem. More... | |
static | getSha1Base36FromPath ( $path) |
Get a SHA-1 hash of a file in the local filesystem, in base-36 lower case encoding, zero padded to 31 digits. More... | |
static | placeholderProps () |
Placeholder file properties to use for files that don't exist. More... | |
Protected Attributes | |
bool | $canDelete = false |
Garbage collect the temp file *. More... | |
Protected Attributes inherited from FSFile | |
string | $path |
Path to file *. More... | |
string | $sha1Base36 |
File SHA-1 in base 36 *. More... | |
Static Protected Attributes | |
static | $instances = array() |
Additional Inherited Members | |
Protected Member Functions inherited from FSFile | |
extractImageSizeInfo (array $gis) | |
Exract image size information. More... | |
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::__destruct | ( | ) |
Cleans up after the temporary file by deleting it.
Definition at line 127 of file TempFSFile.php.
References wfRestoreWarnings(), and wfSuppressWarnings().
TempFSFile::autocollect | ( | ) |
Set flag clean up after the temporary file.
Definition at line 118 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 90 of file TempFSFile.php.
References array().
|
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 44 of file TempFSFile.php.
References $ext, FSFile\$path, wfProfileIn(), wfProfileOut(), wfRandomString(), wfRestoreWarnings(), wfSuppressWarnings(), and wfTempDir().
Referenced by UploadFromChunks\concatenateChunks(), FSFileBackend\doCreateInternal(), MemoryFileBackend\doGetLocalCopyMulti(), FSFileBackend\doGetLocalCopyMulti(), SwiftFileBackend\doGetLocalCopyMulti(), FileBackendTest\doTestDoOperationsPipeline(), ApiImageRotate\execute(), UploadFromUrl\makeTemporaryFile(), FileBackendTest\provider_testStore(), and File\transform().
TempFSFile::preserve | ( | ) |
Set flag to not clean up after the temporary file.
Definition at line 107 of file TempFSFile.php.
TempFSFile::purge | ( | ) |
Purge this file off the file system.
Definition at line 75 of file TempFSFile.php.
References $ok, wfRestoreWarnings(), and wfSuppressWarnings().
|
protected |
Garbage collect the temp file *.
Definition at line 31 of file TempFSFile.php.
|
staticprotected |
Definition at line 34 of file TempFSFile.php.