diff options
author | Haoyi Li <haoyi@haoyi-mbp.corp.dropbox.com> | 2014-11-26 00:50:50 -0800 |
---|---|---|
committer | Haoyi Li <haoyi@haoyi-mbp.corp.dropbox.com> | 2014-11-26 00:50:50 -0800 |
commit | 88595a41e3ec13c1a516e847fe3d0b279facf3fc (patch) | |
tree | 4f03b902de7b81fa2e32792e84b680038345e761 /examples/scala-js/tools/shared/src/main/scala/scala/scalajs/tools/classpath/builder/FileSystem.scala | |
parent | 82773a11c99d260e97ca63356bfb7b417599b1e9 (diff) | |
download | hands-on-scala-js-88595a41e3ec13c1a516e847fe3d0b279facf3fc.tar.gz hands-on-scala-js-88595a41e3ec13c1a516e847fe3d0b279facf3fc.tar.bz2 hands-on-scala-js-88595a41e3ec13c1a516e847fe3d0b279facf3fc.zip |
killed
Diffstat (limited to 'examples/scala-js/tools/shared/src/main/scala/scala/scalajs/tools/classpath/builder/FileSystem.scala')
-rw-r--r-- | examples/scala-js/tools/shared/src/main/scala/scala/scalajs/tools/classpath/builder/FileSystem.scala | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/examples/scala-js/tools/shared/src/main/scala/scala/scalajs/tools/classpath/builder/FileSystem.scala b/examples/scala-js/tools/shared/src/main/scala/scala/scalajs/tools/classpath/builder/FileSystem.scala deleted file mode 100644 index 99a8ca2..0000000 --- a/examples/scala-js/tools/shared/src/main/scala/scala/scalajs/tools/classpath/builder/FileSystem.scala +++ /dev/null @@ -1,57 +0,0 @@ -package scala.scalajs.tools.classpath.builder - -import scala.scalajs.tools.io._ - -import scala.collection.immutable.Traversable - -import java.io.{InputStream, Reader} - -/** Abstraction of a FileSystem, so classpath builders can be used with virtual - * file systems - */ -trait FileSystem { - - type File - - /** Dummy version constant to identify files for which a version can not be - * found. - * This constant should never collide with the result of getVersion. - */ - val DummyVersion: String - - def isDirectory(f: File): Boolean - def isFile(f: File): Boolean - def isJSFile(f: File): Boolean - def isIRFile(f: File): Boolean - def isJARFile(f: File): Boolean - def exists(f: File): Boolean - - def getName(f: File): String - /** A string that uniquely identifies this file's location */ - def getAbsolutePath(f: File): String - /** A string that identifies the version of a file: If it equals the version - * of another file with the same absolute path, the two files must be equal. - * This is usually the lastModified date, but ordering is not required - */ - def getVersion(f: File): String - /** A string that globally identifies the version of a file: If it equals the - * global version of any other file, they must equal. - */ - def getGlobalVersion(f: File): String = - CacheUtils.joinVersions(getAbsolutePath(f), getVersion(f)) - - /** A string that globally identifies a file for which a version can not be - * found. Example: a file that does not exists. - */ - def getDummyVersion(f: File): String = - CacheUtils.joinVersions(getAbsolutePath(f), DummyVersion) - - /** List files in a directory */ - def listFiles(d: File): Traversable[File] - - def toJSFile(f: File): VirtualJSFile - def toIRFile(f: File): VirtualScalaJSIRFile - def toReader(f: File): Reader - def toInputStream(f: File): InputStream - -} |