core/src/main/java/com/opentext/ia/sdk/support/io/FileSupplier.java
public static Supplier<File> fromDirectory(File dir, String prefix, String suffix) {
    return new Supplier<File>() {
      private int count;

      @Override
      public File get() {
        return new File(ensureDir(dir), String.format("%s%d%s", prefix, ++count, suffix));
      }
    };
  }
public static Supplier<File> fromDirectory(File dir, String prefix, String suffix) {
    return new Supplier<File>() {
      private int count;

      @Override
      public File get() {
        return new File(ensureDir(dir), String.format("%s%d%s", prefix, ++count, suffix));
      }
    };
  }
Returns a supplier that creates sequentially named files in the given directory.
@param dir The directory in which to create files
@param prefix The prefix for the file names
@param suffix The suffix for the file names
@return A supplier that creates sequentially named files in the given directory