public static void writeFofn(final File destination,final List<File> files) throws IOException {
  final BufferedWriter bw=new BufferedWriter(new FileWriter(destination));
  try {
    for (    final File file : files) {
      bw.write(wrapArg(file.getAbsolutePath()));
      bw.newLine();
    }
    bw.flush();
  }
  finally {
    bw.close();
  }
}

public static void writeFofn ( final File destination , final List < File > files ) throws IOException { final BufferedWriter bw = new BufferedWriter ( new FileWriter ( destination ) ) ; try { for ( final File file : files ) { bw . write ( wrapArg ( file . getAbsolutePath ( ) ) ) ; bw . newLine ( ) ; } bw . flush ( ) ; } finally { bw . close ( ) ; } }
takes a list of files and writes it as a " file of file names " ( i . e . a file with one filepath on each line ) to the destination file , overwriting the destination file if it exists . note the filepath used is the absolute filepath
