diff options
author | Paul Phillips <paulp@improving.org> | 2009-09-11 18:12:33 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-09-11 18:12:33 +0000 |
commit | e604abb25c1c95aa75b969519aea3a915ba11798 (patch) | |
tree | 05081680122b722e0d62c2b34cbc18cc7c5019ed /src/partest | |
parent | f9394a4d472887c4563e768467170a9b1677d5c1 (diff) | |
download | scala-e604abb25c1c95aa75b969519aea3a915ba11798.tar.gz scala-e604abb25c1c95aa75b969519aea3a915ba11798.tar.bz2 scala-e604abb25c1c95aa75b969519aea3a915ba11798.zip |
Resurrected the former contents of scala.io in ...
Resurrected the former contents of scala.io in their new home,
scala.tools.nsc.io, and equipped them with fake beards and handlebar
moustaches. Also restored the reverted bits of the compiler which had
been taking advantage of them.
Diffstat (limited to 'src/partest')
-rw-r--r-- | src/partest/scala/tools/partest/nest/DirectRunner.scala | 11 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/FileManager.scala | 8 |
2 files changed, 6 insertions, 13 deletions
diff --git a/src/partest/scala/tools/partest/nest/DirectRunner.scala b/src/partest/scala/tools/partest/nest/DirectRunner.scala index 3cc84b8d89..c087b58c69 100644 --- a/src/partest/scala/tools/partest/nest/DirectRunner.scala +++ b/src/partest/scala/tools/partest/nest/DirectRunner.scala @@ -11,6 +11,7 @@ package nest import java.io.{File, PrintStream, FileOutputStream, BufferedReader, InputStreamReader, StringWriter, PrintWriter} import java.util.StringTokenizer +import scala.tools.nsc.io.Directory import scala.actors.Actor._ import scala.actors.TIMEOUT @@ -66,13 +67,9 @@ trait DirectRunner { fails += 1 } } - logsToDelete.foreach { log => - NestUI.verbose("deleting "+log) - fileManager.deleteRecursive(log) - } - outdirsToDelete.foreach { outdir => - NestUI.verbose("deleting "+outdir) - fileManager.deleteRecursive(outdir) + for (x <- logsToDelete ::: outdirsToDelete) { + NestUI.verbose("deleting "+x) + Directory(x).deleteRecursively() } (succs, fails) diff --git a/src/partest/scala/tools/partest/nest/FileManager.scala b/src/partest/scala/tools/partest/nest/FileManager.scala index bdce6c8439..238681bfc6 100644 --- a/src/partest/scala/tools/partest/nest/FileManager.scala +++ b/src/partest/scala/tools/partest/nest/FileManager.scala @@ -10,6 +10,7 @@ package nest import java.io.{File, FilenameFilter, IOException, StringWriter} import java.net.URI +import scala.tools.nsc.io.Directory trait FileManager { @@ -18,12 +19,7 @@ trait FileManager { if (inx < 0) name else name.substring(0, inx) } - def deleteRecursive(dir: File) { - if (dir.isDirectory) { - for (file <- dir.list) deleteRecursive(new File(dir, file)) - } - dir.delete - } + def deleteRecursive(dir: File) { Directory(dir).deleteRecursively() } /** * Compares two files using a Java implementation of the GNU diff |