Esempio n. 1
0
  private File extractVersionOfListFile(List<String> files) throws IOException {
    List<String> filesWithRequiredVersion = new ArrayList<String>();
    for (String file : files) {
      if (hasRequiredVersion(file)) {
        filesWithRequiredVersion.add(file);
      }
    }

    File rpmVersionedListFile = fileFactory.getRpmListFile(version);
    writeRpmFileList(filesWithRequiredVersion, rpmVersionedListFile);
    return rpmVersionedListFile;
  }
Esempio n. 2
0
 public RpmListWriter(
     final File baseRpmDir,
     final String addedFiles,
     final String version,
     final boolean singleRpmPerDirectory,
     final boolean forceFullScan,
     final ListFileFactory fileFactory,
     final RpmScanner scanner) {
   this.baseRpmDir = baseRpmDir;
   this.addedFiles = addedFiles;
   this.version = version;
   this.singleRpmPerDirectory = singleRpmPerDirectory;
   this.forceFullScan = forceFullScan;
   this.fileFactory = fileFactory;
   this.scanner = scanner;
   this.rpmListFile = fileFactory.getRpmListFile();
 }