if (!is_dir($uploaddir)) {
                $indexFile = XOOPS_UPLOAD_PATH . '/index.html';
                if (!mkdir($uploaddir, 0777) && !is_dir($uploaddir)) {
                    throw new \RuntimeException(sprintf('Directory "%s" was not created', $uploaddir));
                }