protected function getFileList($file)
{
$list = [];
$zip = new \ZipArchive();
if ($zip->open($file) === true) {
for ($i = 0; $i < $zip->numFiles; $i++) {
$list[] = $zip->getNameIndex($i);
}
$zip->close();
return $list;
} else {
throw new \RuntimeException('Can not build file list.');
}
}