public static function tempnam($path = null, $prefix = '')
    {
        if ($path === null) {
            $path = sys_get_temp_dir();
        }

        if ($tempfile = tempnam($path, $prefix)) {
            unlink($tempfile);
            mkdir($tempfile);
        }

        return $tempfile;
    }