Dotty Documentation


class VirtualDirectory
extends AbstractFile

An in-memory directory.

[-] Constructors

VirtualDirectory ( name: String , maybeContainer: Option [ VirtualDirectory ] )

[-] Members

[+] private val files : Map [ String, AbstractFile ]
[+] val lastModified : Long

Returns the time that this abstract file was last modified.

[+] private val maybeContainer : Option [ VirtualDirectory ]
[+] val name : String

Returns the name of this abstract file.

[+] def absolute : AbstractFile

The absolute file, if this is a relative file.

[+] def clear ( ) : Unit
[+] def container : AbstractFile

Returns the containing directory of this abstract file

[+] def create ( ) : Unit

Does this abstract file denote an existing file?

[+] def delete ( ) : Unit

Delete the underlying file or directory (recursively).

[+] override def file : JFile

Returns the underlying File if any and null otherwise.

[+] override def fileNamed ( name: String ) : AbstractFile

Get the file in this directory with the given name, creating an empty file if it does not already existing.

[+] override def input : InputStream

returns an input stream so the file can be read

[+] def isDirectory : Boolean

Is this abstract file a directory?

[+] override def isVirtual : Boolean

Does this abstract file correspond to something on-disk?

[+] def iterator ( ) : Iterator [ AbstractFile ]

Returns all abstract subfiles of this abstract directory.

[+] override def lookupName ( name: String , directory: Boolean ) : AbstractFile

Returns the abstract file in this abstract directory with the specified name. If there is no such file, returns null. The argument directory tells whether to look for a directory or a regular file.

[+] def lookupNameUnchecked ( name: String , directory: Boolean ) : AbstractFile

Returns an abstract file with the given name. It does not check that it exists.

[+] override def output : OutputStream

Returns an output stream for writing the file

[+] def path : String

Returns the path of this abstract file.

[+] override def subdirectoryNamed ( name: String ) : AbstractFile

Get the subdirectory with a given name, creating it if it does not already exist.