public function __construct($prefix, $suffix = null) { $temp = sys_get_temp_dir() . "/pharext-" . $this->getUser(); if (!is_dir($temp) && !mkdir($temp, 0700, true)) { throw new Exception(); } $this->name = $temp . "/" . uniqid($prefix) . $suffix; }