Example #1
0
  private void compareBinaryFolder(String path, boolean res) throws BrutException, IOException {
    Boolean exists = true;

    String tmp = "";
    if (res) {
      tmp = File.separatorChar + "res" + File.separatorChar;
    }

    String location = tmp + path;

    FileDirectory fileDirectory = new FileDirectory(sTestOrigDir + location);

    Set<String> files = fileDirectory.getFiles(true);
    for (String filename : files) {

      File control = new File((sTestOrigDir + location), filename);
      File test = new File((sTestNewDir + location), filename);

      if (!test.isFile() || !control.isFile()) {
        exists = false;
      }
    }

    assertTrue(exists);
  }
Example #2
0
 private void visit(Set<String> names, String prefix, File file) {
   for (File child : file.listFiles()) {
     if (child.isFile()) {
       names.add(prefix + child.getName());
     } else if (child.isDirectory()) {
       visit(names, prefix + child.getName() + "/", child);
     }
   }
 }