1 | <?php |
||
9 | class TempDirectory |
||
10 | { |
||
11 | /** @var string[] */ |
||
12 | private static $tempDirs = array( |
||
13 | '/dev/shm', |
||
14 | ); |
||
15 | |||
16 | /** @var string */ |
||
17 | private $timestamp; |
||
18 | |||
19 | /** |
||
20 | * Paraunit constructor. |
||
21 | */ |
||
22 | 40 | public function __construct() |
|
26 | |||
27 | /** |
||
28 | * @return string |
||
29 | */ |
||
30 | 40 | public function getTempDirForThisExecution() |
|
39 | |||
40 | /** |
||
41 | * @return string |
||
42 | * |
||
43 | 40 | * @throws \RuntimeException |
|
44 | */ |
||
45 | 40 | public static function getTempBaseDir() |
|
67 | |||
68 | /** |
||
69 | * @param string $path |
||
70 | * |
||
71 | * @throws \RuntimeException |
||
72 | */ |
||
73 | private static function mkdirIfNotExists($path) |
||
85 | } |
||
86 |