//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller, Srikalyan Swayampakula, Michael E. Cotterell * @version 1.6 * @date Wed Aug 27 14:16:12 EDT 2013 * @see LICENSE (MIT style license file). */ package scalation import java.io.{BufferedWriter, File, FileWriter} import scala.collection.mutable.ArrayBuffer //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** The `GenIndexHtml` object is used to create "index.html" files in source code * directories (main and test) to enable Web browsing of source code. * > runMain scalation.GenIndexHtml */ object GenIndexHtml extends App { private val SKIP = "old" // do not process files in this directory private val mainCodeDir = SRC_DIR println ("Generate index.html files starting from mainCodeDir = " + mainCodeDir) recCreate (new File (mainCodeDir)) /*** private val mainCodeDir = SRC_DIR + "main" + ⁄ + "scala" private val testCodeDir = SRC_DIR + "test" + ⁄ + "scala" println ("Generate index.html files starting from testCodeDir = " + testCodeDir) recCreate (new File (testCodeDir)) ***/ //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** Recursively create index.html files for each directory. * @param f the file/directory to examine */ def recCreate (f: File) { recDeleteIndex (f) val dirs = new ArrayBuffer [File] () try { val iFile = new File (f.getAbsolutePath () + "/index.html") // the index.html file to write val fos = new BufferedWriter (new FileWriter (iFile)) fos.write ("\n
\n\n