\Hazaar\File
TempDir
Create a temporary directory

This class will create and manage a temporary directory that is stored in the application runtime directory in a subdirectory called 'temp'. The directory is not stateful, meaning it can only be used for the lifetime of the execution and once the file object falls out of scope it, and all of it's contents, will be deleted automatically.

Tags

Since

2.3

Summary
Methods Properties Constants
No properties No constants
Methods
__construct()
__construct($name = null)
Temporary directory constructor

Parameters

$namemixed

An option name to give the temp directory. Leaving this null will auto-generate a name.

__destruct()
__destruct()
Temporary directory destructor

This method will clean up the directory on disk when the object falls out of scope. This includes deleting anything that is contained in the directory.