os = new ZipOutputStream(new FileOutputStream(zipPath)); for (String name : filenames) { File file = new File(Util.ensureSeparator(sourceDir, true) + name); addFileToZip(file, os);
private String getOutputPath (MergingInfo info) { if ( Util.isEmpty(this.overrideOutputPath) ) { return manifest.getMergeDirectory() + info.getRelativeTargetPath(); } else { return Util.ensureSeparator(overrideOutputPath, false) + info.getRelativeTargetPath(); } }
@Override protected Event handleStartDocument(Event event) { close(); // For concurrent pipelines tmDir = String.format("%s~okapi-step-repetitionanalysis-%s/", Util.ensureSeparator(Util.getTempDirectory(), true), UUID.randomUUID().toString()); Util.createDirectories(tmDir); searchExact = params.getFuzzyThreshold() >= 100; tuCounter = 0; groupCounter = 1; tmWriter = (PensieveWriter) TmWriterFactory.createFileBasedTmWriter(tmDir, true); currentTm = new PensieveSeeker(tmWriter.getIndexWriter()); return super.handleStartDocument(event); }