| 1 | <?php |
||
| 9 | class TempDirectory |
||
| 10 | { |
||
| 11 | /** @var array */ |
||
| 12 | private static $tempDirs = array( |
||
| 13 | '/dev/shm', |
||
| 14 | '/temp', |
||
| 15 | ); |
||
| 16 | |||
| 17 | /** @var string */ |
||
| 18 | private $timestamp; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Paraunit constructor. |
||
| 22 | */ |
||
| 23 | 40 | public function __construct() |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | 40 | public function getTempDirForThisExecution() |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | 40 | public static function getTempBaseDir() |
|
| 61 | |||
| 62 | /** |
||
| 63 | * @param string $path |
||
| 64 | */ |
||
| 65 | 40 | private static function mkdirIfNotExists($path) |
|
| 77 | } |
||
| 78 |