All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala.tools.nsc.io.NoAbstractFile.scala Maven / Gradle / Ivy

There is a newer version: 2.11.2
Show newest version
/* NSC -- new Scala compiler
 * Copyright 2005-2011 LAMP/EPFL
 * @author  Paul Phillips
 */

package scala.tools.nsc
package io

import java.io.InputStream
import java.io.{ File => JFile }

/** A distinguished object so you can avoid both null
 *  and Option.
 */
object NoAbstractFile extends AbstractFile {
  def absolute: AbstractFile = this
  def container: AbstractFile = this
  def create(): Unit = ???
  def delete(): Unit = ???
  def file: JFile = null
  def input: InputStream = null
  def isDirectory: Boolean = false
  def iterator: Iterator[AbstractFile] = Iterator.empty
  def lastModified: Long = 0L
  def lookupName(name: String, directory: Boolean): AbstractFile = null
  def lookupNameUnchecked(name: String, directory: Boolean): AbstractFile = null
  def name: String = ""
  def output: java.io.OutputStream = null
  def path: String = ""
  override def toByteArray = Array[Byte]()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy