diff options
author | Burak Emir <emir@epfl.ch> | 2006-09-21 17:50:41 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2006-09-21 17:50:41 +0000 |
commit | 920e6a2e5ab9834e0a034199960201d40569e011 (patch) | |
tree | 19dc21d51a2f6f76c0ddccb4d883701529e1b152 /src/compiler/scala/tools/nsc/io/PlainFile.scala | |
parent | 9a45bd5bdb246e19912a46aed6a672d6119d428f (diff) | |
download | scala-920e6a2e5ab9834e0a034199960201d40569e011.tar.gz scala-920e6a2e5ab9834e0a034199960201d40569e011.tar.bz2 scala-920e6a2e5ab9834e0a034199960201d40569e011.zip |
reorganized scala.tools.nsc.io!
Diffstat (limited to 'src/compiler/scala/tools/nsc/io/PlainFile.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/io/PlainFile.scala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/io/PlainFile.scala b/src/compiler/scala/tools/nsc/io/PlainFile.scala index 60f8ad4f7f..eb1852666f 100644 --- a/src/compiler/scala/tools/nsc/io/PlainFile.scala +++ b/src/compiler/scala/tools/nsc/io/PlainFile.scala @@ -15,7 +15,7 @@ import java.io.{File, FileInputStream, IOException}; object PlainFile { /** Returns "fromFile(new File(path))". */ - def fromPath(path: String): AbstractFile = fromFile(new File(path)); + //def fromPath(path: String): AbstractFile = fromFile(new File(path)); /** * If the specified File exists, returns an abstract file backed @@ -26,7 +26,8 @@ object PlainFile { } -/** This class implements an abstract file backed by a File. */ +/** This class implements an abstract file backed by a File. + */ class PlainFile(val file: File) extends AbstractFile { assert(file != null); @@ -62,8 +63,8 @@ class PlainFile(val file: File) extends AbstractFile { /** Returns the time that this abstract file was last modified. */ def lastModified: Long = file.lastModified(); - /** Reads the content of this abstract file into a byte array. */ - def read: Array[Byte] = { + /** Reads the content of this abstract file into a byte array. + override def getBytes: Array[Byte] = { assert(!isDirectory, "cannot read directory '" + this + "'"); val in = new FileInputStream(file); var rest: Int = file.length().toInt; @@ -77,6 +78,7 @@ class PlainFile(val file: File) extends AbstractFile { in.close(); return buf; } + */ /** Returns all abstract subfiles of this abstract directory. */ def elements: Iterator[AbstractFile] = { |