original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Returns whether the file at the given location exists