diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-03-22 21:25:35 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-03-22 21:28:27 +0100 |
commit | 6cb50acfb5ee4df342e83d8505116d4607f45d1c (patch) | |
tree | bd37410452b625a74c5337f9a5509ae8451b5189 /src/compiler/scala/tools/nsc/classpath/FileUtils.scala | |
parent | ad48e5918081c679546f50b6f52dd8e0813754e7 (diff) | |
download | scala-6cb50acfb5ee4df342e83d8505116d4607f45d1c.tar.gz scala-6cb50acfb5ee4df342e83d8505116d4607f45d1c.tar.bz2 scala-6cb50acfb5ee4df342e83d8505116d4607f45d1c.zip |
Enable flat classpath by default
Implements VirtualDirectoryFlatClassPath, which is required for the
presentation compiler created for the repl's tab-completion.
Various minor cleanups in the flat classpath implementation.
Diffstat (limited to 'src/compiler/scala/tools/nsc/classpath/FileUtils.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/classpath/FileUtils.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/classpath/FileUtils.scala b/src/compiler/scala/tools/nsc/classpath/FileUtils.scala index ee2528e15c..bbcfcb24ca 100644 --- a/src/compiler/scala/tools/nsc/classpath/FileUtils.scala +++ b/src/compiler/scala/tools/nsc/classpath/FileUtils.scala @@ -3,7 +3,7 @@ */ package scala.tools.nsc.classpath -import java.io.{ File => JFile } +import java.io.{File => JFile, FileFilter} import java.net.URL import scala.reflect.internal.FatalError import scala.reflect.io.AbstractFile @@ -65,4 +65,8 @@ object FileUtils { // because then some tests in partest don't pass private def mayBeValidPackage(dirName: String): Boolean = (dirName != "META-INF") && (dirName != "") && (dirName.charAt(0) != '.') + + def mkFileFilter(f: JFile => Boolean) = new FileFilter { + def accept(pathname: JFile): Boolean = f(pathname) + } } |