summaryrefslogtreecommitdiff
path: root/src/partest
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-09-07 22:16:58 +0000
committerPaul Phillips <paulp@improving.org>2009-09-07 22:16:58 +0000
commitaef123719dbe81b20fe3eed6390df9d62fd24a0b (patch)
tree0148ea23a2d709ac7173edf3e87122bb9d580eb3 /src/partest
parent3335e037a83edef65eb3c6fa75be23c0d0a46aab (diff)
downloadscala-aef123719dbe81b20fe3eed6390df9d62fd24a0b.tar.gz
scala-aef123719dbe81b20fe3eed6390df9d62fd24a0b.tar.bz2
scala-aef123719dbe81b20fe3eed6390df9d62fd24a0b.zip
Reverts scala.io.* to its natural state, and th...
Reverts scala.io.* to its natural state, and the rest of trunk to using java.io.File. Anyone who wants to salvage any usable bits is of course welcome to do so, so long as they also assume responsibility for those bits.
Diffstat (limited to 'src/partest')
-rw-r--r--src/partest/scala/tools/partest/nest/DirectRunner.scala11
-rw-r--r--src/partest/scala/tools/partest/nest/FileManager.scala8
2 files changed, 13 insertions, 6 deletions
diff --git a/src/partest/scala/tools/partest/nest/DirectRunner.scala b/src/partest/scala/tools/partest/nest/DirectRunner.scala
index 160fee3d5a..3cc84b8d89 100644
--- a/src/partest/scala/tools/partest/nest/DirectRunner.scala
+++ b/src/partest/scala/tools/partest/nest/DirectRunner.scala
@@ -11,7 +11,6 @@ package nest
import java.io.{File, PrintStream, FileOutputStream, BufferedReader,
InputStreamReader, StringWriter, PrintWriter}
import java.util.StringTokenizer
-import scala.io.Directory
import scala.actors.Actor._
import scala.actors.TIMEOUT
@@ -67,9 +66,13 @@ trait DirectRunner {
fails += 1
}
}
- for (x <- logsToDelete ::: outdirsToDelete) {
- NestUI.verbose("deleting "+x)
- Directory(x).deleteRecursively()
+ logsToDelete.foreach { log =>
+ NestUI.verbose("deleting "+log)
+ fileManager.deleteRecursive(log)
+ }
+ outdirsToDelete.foreach { outdir =>
+ NestUI.verbose("deleting "+outdir)
+ fileManager.deleteRecursive(outdir)
}
(succs, fails)
diff --git a/src/partest/scala/tools/partest/nest/FileManager.scala b/src/partest/scala/tools/partest/nest/FileManager.scala
index f5cc52c555..bdce6c8439 100644
--- a/src/partest/scala/tools/partest/nest/FileManager.scala
+++ b/src/partest/scala/tools/partest/nest/FileManager.scala
@@ -10,7 +10,6 @@ package nest
import java.io.{File, FilenameFilter, IOException, StringWriter}
import java.net.URI
-import scala.io.Directory
trait FileManager {
@@ -19,7 +18,12 @@ trait FileManager {
if (inx < 0) name else name.substring(0, inx)
}
- def deleteRecursive(dir: File) { Directory(dir).deleteRecursively() }
+ def deleteRecursive(dir: File) {
+ if (dir.isDirectory) {
+ for (file <- dir.list) deleteRecursive(new File(dir, file))
+ }
+ dir.delete
+ }
/**
* Compares two files using a Java implementation of the GNU diff