summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/io/ZipArchive.scala
diff options
context:
space:
mode:
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]