MediaWiki  REL1_22
TempFSFile Class Reference

This class is used to hold the location and do limited manipulation of files stored temporarily (this will be whatever wfTempDir() returns) 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.
 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.

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 (this will be whatever wfTempDir() returns)

Definition at line 30 of file TempFSFile.php.


Constructor & Destructor Documentation

Cleans up after the temporary file by deleting it.

Definition at line 121 of file TempFSFile.php.

References wfRestoreWarnings(), and wfSuppressWarnings().


Member Function Documentation

Set flag clean up after the temporary file.

Returns:
TempFSFile This object

Definition at line 113 of file TempFSFile.php.

TempFSFile::bind ( object)

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

Parameters:
Object$object
Returns:
TempFSFile This object

Definition at line 87 of file TempFSFile.php.

References array().

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:
string$prefix
string$extension
Returns:
TempFSFile|null

Definition at line 44 of file TempFSFile.php.

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

Referenced by UploadFromChunks\concatenateChunks(), and ApiImageRotate\execute().

Set flag to not clean up after the temporary file.

Returns:
TempFSFile This object

Definition at line 103 of file TempFSFile.php.

Purge this file off the file system.

Returns:
bool Success

Definition at line 73 of file TempFSFile.php.

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


Member Data Documentation

TempFSFile::$canDelete = false [protected]

Definition at line 31 of file TempFSFile.php.

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

Definition at line 34 of file TempFSFile.php.


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