protected function fileExistsWithinZip($zipStreamURI)
    {
        $doesFileExists = false;

        $pattern = '/zip:\/\/([^#]+)#(.*)/';
        if (preg_match($pattern, $zipStreamURI, $matches)) {
            $zipFilePath = $matches[1];
            $innerFilePath = $matches[2];

            $zip = new \ZipArchive();
            if ($zip->open($zipFilePath) === true) {
                $doesFileExists = ($zip->locateName($innerFilePath) !== false);
                $zip->close();
            }
        }

        return $doesFileExists;
    }
protected function fileExistsWithinZip($zipStreamURI)
    {
        $doesFileExists = false;

        $pattern = '/zip:\/\/([^#]+)#(.*)/';
        if (preg_match($pattern, $zipStreamURI, $matches)) {
            $zipFilePath = $matches[1];
            $innerFilePath = $matches[2];

            $zip = new \ZipArchive();
            if ($zip->open($zipFilePath) === true) {
                $doesFileExists = ($zip->locateName($innerFilePath) !== false);
                $zip->close();
            }
        }

        return $doesFileExists;
    }
protected function fileExistsWithinZip ( $ zipStreamURI ) { $ doesFileExists = false ; $ pattern = '/zip:\/\/([^#]+)#(.*)/' ; if ( preg_match ( $ pattern , $ zipStreamURI , $ matches ) ) { $ zipFilePath = $ matches [ 1 ] ; $ innerFilePath = $ matches [ 2 ] ; $ zip = new \ ZipArchive ( ) ; if ( $ zip -> open ( $ zipFilePath ) === true ) { $ doesFileExists = ( $ zip -> locateName ( $ innerFilePath ) !== false ) ; $ zip -> close ( ) ; } } return $ doesFileExists ; }
Returns whether the file at the given location exists

@param string $zipStreamURI URI of a zip stream, e.g. "zip://file.zip#path/inside.xml"
@return bool TRUE if the file exists, FALSE otherwise
Returns whether the file at the given location exists