public function listContents($zipFile, array $options = [])
    {
        $fs = $this->getFilesystem();
        if (!$fs->isFile($zipFile)) {
            throw new Exception(t('Unable to find the ZIP file %s', $zipFile));
        }
        $options += [
            'skipCheck' => false,
            'excludeDirs' => false,
            'excludeFiles' => false,
        ];
        $result = [];
        $zip = new ZipArchive();
        try {
            $flags = 0;
            if (!$options['skipCheck']) {
                $flags |= ZipArchive::CHECKCONS;
            }
            $zipErr = @$zip->open($zipFile, $flags);
            if ($zipErr !== true) {
                throw new Exception($this->describeZipArchiveError($zip, $zipErr));
            }
            for ($index = 0; $index < $zip->numFiles; ++$index) {
                $stat = @$zip->statIndex($index);
                if ($stat === false) {
                    throw new Exception(t('Failed to retrieve the details of a ZIP archive entry.'));
                }
                $isDir = substr($stat['name'], -1) === '/' || substr($stat['name'], -1) === '\\';
                if ($isDir) {
                    if ($options['excludeDirs']) {
                        continue;
                    }
                } else {
                    if ($options['excludeFiles']) {
                        continue;
                    }
                }
                $item = [
                    'type' => $isDir ? 'D' : 'F',
                    'date' => (isset($stat['mtime']) && $stat['mtime']) ? DateTime::createFromFormat('U', $stat['mtime']) : null,
                ];
                if (!$isDir) {
                    $item += [
                        'originalSize' => isset($stat['size']) ? (int) $stat['size'] : null,
                        'compressedSize' => isset($stat['comp_size']) ? (int) $stat['comp_size'] : null,
                    ];
                }
                $result[trim($stat['name'], '/\\')] = $item;
            }
            @$zip->close();
            $zip = null;
        } catch (Exception $x) {
            if ($zip !== null) {
                try {
                    @$zip->close();
                } catch (\Exception $foo) {
                }
                $zip = null;
            }
            throw $x;
        }

        return $result;
    }