File generate(final File outputDir) throws IOException {
    File outputFile = new File(outputDir, generator.getScriptName());
    try (BufferedWriter writer = Files.newBufferedWriter(outputFile.toPath())) {

      writePreamble(writer);
      writeAbout(writer);
      writeExistenceTest(writer);
      writeRestoreData(writer, outputDir.toPath());
      writeIncrementalData(writer);
      generator.writeExit(writer);
    }

    outputFile.setExecutable(true, true);
    return outputFile;
  }
This class is used to automatically generate a restore script for a backup. It keeps a list of
files that were backed up, and a list of files that we should test for to avoid overriding when
we restore the backup.

<p>
It generates either a restore.sh for unix or a restore.bat for windows.
geode-core/src/main/java/org/apache/geode/internal/cache/backup/RestoreScript.java