MediaWiki  REL1_19
TempFSFile Class Reference

This class is used to hold the location and do limited manipulation of files stored temporarily (usually this will be $wgTmpDirectory) More...

Inheritance diagram for TempFSFile:
Collaboration diagram for TempFSFile:

List of all members.

Public Member Functions

 __destruct ()
 Cleans up after the temporary file by deleting it.
 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.

Protected Attributes

 $canDelete = false

Static Protected Attributes

static $instances = array()

Detailed Description

This class is used to hold the location and do limited manipulation of files stored temporarily (usually this will be $wgTmpDirectory)

Definition at line 13 of file TempFSFile.php.


Constructor & Destructor Documentation

Cleans up after the temporary file by deleting it.

Definition at line 85 of file TempFSFile.php.

References wfRestoreWarnings(), and wfSuppressWarnings().

Here is the call graph for this function:


Member Function Documentation

TempFSFile::bind ( object)

Clean up the temporary file only after an object goes out of scope.

Parameters:
$objectObject
Returns:
void

Definition at line 67 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.

Parameters:
$prefixstring
$extensionstring
Returns:
TempFSFile|null

Definition at line 27 of file TempFSFile.php.

References $ext, FSFile\$path, wfRestoreWarnings(), wfSuppressWarnings(), and wfTempDir().

Referenced by UploadFromChunks\concatenateChunks(), FSFileBackend\getLocalCopy(), SwiftFileBackend\getLocalCopy(), FileBackendTest\provider_testStore(), and File\transform().

Here is the call graph for this function:

Here is the caller graph for this function:

Set flag to not clean up after the temporary file.

Returns:
void

Definition at line 78 of file TempFSFile.php.

Purge this file off the file system.

Returns:
bool Success

Definition at line 53 of file TempFSFile.php.

References $ok, wfRestoreWarnings(), and wfSuppressWarnings().

Here is the call graph for this function:


Member Data Documentation

TempFSFile::$canDelete = false [protected]

Definition at line 14 of file TempFSFile.php.

TempFSFile::$instances = array() [static, protected]

Definition at line 17 of file TempFSFile.php.


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