6 * Create a temporary directory
8 class Tempdir
extends \SplFileInfo
11 * @param string $prefix prefix to uniqid()
12 * @throws \pharext\Exception
14 public function __construct($prefix) {
15 $temp = new Tempname($prefix);
16 if (!is_dir($temp) && !mkdir($temp, 0700, true)) {
17 throw new Exception("Could not create tempdir: ".error_get_last()["message"]);
19 parent
::__construct($temp);