summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/io/ZipArchive.scala
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2009-05-29 14:16:24 +0000
committerIulian Dragos <jaguarul@gmail.com>2009-05-29 14:16:24 +0000
commit9636749e637088f8ba149b73620535cd1992614a (patch)
tree86882e4a89a8ee60609f36b5dc0d4e4c20f368d5 /src/compiler/scala/tools/nsc/io/ZipArchive.scala
parent036f2602017bf04dc3a40783a531d488bbd9e12a (diff)
downloadscala-9636749e637088f8ba149b73620535cd1992614a.tar.gz
scala-9636749e637088f8ba149b73620535cd1992614a.tar.bz2
scala-9636749e637088f8ba149b73620535cd1992614a.zip
Refactored the existing dependency tracker and ...
Refactored the existing dependency tracker and added a 'build manager' interface for IDE use.
Diffstat (limited to 'src/compiler/scala/tools/nsc/io/ZipArchive.scala')
-rw-r--r--src/compiler/scala/tools/nsc/io/ZipArchive.scala24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/io/ZipArchive.scala b/src/compiler/scala/tools/nsc/io/ZipArchive.scala
index ab730128bd..c380acd9a3 100644
--- a/src/compiler/scala/tools/nsc/io/ZipArchive.scala
+++ b/src/compiler/scala/tools/nsc/io/ZipArchive.scala
@@ -101,6 +101,12 @@ final class ZipArchive(file: File, val archive: ZipFile) extends PlainFile(file)
root.lookupName(name, directory)
}
+ /** Returns an abstract file with the given name. It does not
+ * check that it exists.
+ */
+ override def lookupNameUnchecked(name: String, directory: Boolean): AbstractFile =
+ throw new UnsupportedOperationException()
+
//########################################################################
// Private Methods
@@ -231,12 +237,24 @@ final class URLZipArchive(url: URL) extends AbstractFile {
def file: File = null
+ def absolute: AbstractFile = this
+
def isDirectory: Boolean = true
def lastModified: Long =
try { url.openConnection().getLastModified() }
catch { case _ => 0 }
+ /** Does this abstract file denote an existing file? */
+ def create {
+ throw new UnsupportedOperationException
+ }
+
+ /** Delete the underlying file or directory (recursively). */
+ def delete {
+ throw new UnsupportedOperationException
+ }
+
def input: InputStream = url.openStream()
def output = throw new Error("unsupported")
@@ -251,6 +269,12 @@ final class URLZipArchive(url: URL) extends AbstractFile {
root.lookupName(name, directory)
}
+ /** Returns an abstract file with the given name. It does not
+ * check that it exists.
+ */
+ def lookupNameUnchecked(name: String, directory: Boolean): AbstractFile =
+ throw new UnsupportedOperationException()
+
private def load() {
def getEntryInputStream(in: InputStream): InputStream = {
val buf = new scala.collection.mutable.ArrayBuffer[Byte]