summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/util/ClassPath.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-02-08 08:47:29 +0000
committerPaul Phillips <paulp@improving.org>2011-02-08 08:47:29 +0000
commit3467ad57e4c2b56cdd02ce0c75af4716b5631a10 (patch)
treeaf5d632276e79a449e9971e94c25bec0c1fc73e4 /src/compiler/scala/tools/nsc/util/ClassPath.scala
parentc89ea6e3ae82d9b6bacda25dceb74a958d2fa4f6 (diff)
downloadscala-3467ad57e4c2b56cdd02ce0c75af4716b5631a10.tar.gz
scala-3467ad57e4c2b56cdd02ce0c75af4716b5631a10.tar.bz2
scala-3467ad57e4c2b56cdd02ce0c75af4716b5631a10.zip
Working on fsc.
for me anyway, with this commit scripts will occasionally reuse a compiler instance, instead of never. Since any tests I write will fail on platforms which aren't mine, there are no tests. I might have to start a platform-specific testing area to break some ice around these huge untested zones. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/util/ClassPath.scala')
-rw-r--r--src/compiler/scala/tools/nsc/util/ClassPath.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/util/ClassPath.scala b/src/compiler/scala/tools/nsc/util/ClassPath.scala
index 0a8c54f297..d64eb78cc5 100644
--- a/src/compiler/scala/tools/nsc/util/ClassPath.scala
+++ b/src/compiler/scala/tools/nsc/util/ClassPath.scala
@@ -79,6 +79,9 @@ object ClassPath {
/** Split the classpath and map them into Paths */
def toPaths(cp: String): List[Path] = split(cp) map (x => Path(x).toAbsolute)
+ /** Make all classpath components absolute. */
+ def makeAbsolute(cp: String): String = fromPaths(toPaths(cp): _*)
+
/** Join the paths as a classpath */
def fromPaths(paths: Path*): String = join(paths map (_.path): _*)