Directory

class Directory(jpath: JPath) extends Path

An abstraction for directories.

Authors:

Paul Phillips

Since:

2.8 ''Note: This is library is considered experimental and should not be used unless you know what you are doing.''

Companion:
object
class Path
class Object
trait Matchable
class Any

Value members

Concrete methods

def deepList(depth: Int): Iterator[Path]

If optional depth argument is not given, will recurse until it runs out of contents.

If optional depth argument is not given, will recurse until it runs out of contents.

An iterator over the contents of this directory.

An iterator over the contents of this directory.

override def normalize: Directory
Definition Classes
override def toAbsolute: Directory
Definition Classes
override def toDirectory: Directory
Definition Classes
override def toFile: File
Definition Classes
override def walkFilter(cond: Path => Boolean): Iterator[Path]
Definition Classes

Inherited methods

def /(child: File): File
Inherited from:
Path
def /(child: Directory): Directory
Inherited from:
Path
def /(child: Path): Path
Inherited from:
Path
def /(child: String): Path

Creates a new Path with the specified path appended. Assumes the type of the new component implies the type of the result.

Creates a new Path with the specified path appended. Assumes the type of the new component implies the type of the result.

Inherited from:
Path
Inherited from:
Path
Inherited from:
Path
Inherited from:
Path
Inherited from:
Path
def createDirectory(force: Boolean, failIfExists: Boolean): Directory
Inherited from:
Path
def createFile(failIfExists: Boolean): File
Inherited from:
Path
def delete(): Unit
Inherited from:
Path

Deletes the path recursively. Returns false on failure. Use with caution!

Deletes the path recursively. Returns false on failure. Use with caution!

Inherited from:
Path
def endsWith(other: Path): Boolean
Inherited from:
Path
override def equals(other: Any): Boolean
Definition Classes
Path -> Any
Inherited from:
Path
Inherited from:
Path
Inherited from:
Path
def hasExtension(ext: String, exts: String*): Boolean
Inherited from:
Path
override def hashCode(): Int
Definition Classes
Path -> Any
Inherited from:
Path
def ifDirectory[T](f: Directory => T): Option[T]
Inherited from:
Path
def ifFile[T](f: File => T): Option[T]
Inherited from:
Path
Inherited from:
Path
Inherited from:
Path
Inherited from:
Path
Inherited from:
Path
def isFresher(other: Path): Boolean
Inherited from:
Path
def isSame(other: Path): Boolean
Inherited from:
Path
Inherited from:
Path
Inherited from:
Path
Inherited from:
Path
Returns:

The path of the parent directory, or root if path is already root

Inherited from:
Path
Inherited from:
Path
Inherited from:
Path
def relativize(other: Path): Path
Inherited from:
Path
def resolve(other: Path): Path
Inherited from:
Path
Inherited from:
Path
Inherited from:
Path

If this path is absolute, returns it: otherwise, returns an absolute path made up of root / this.

If this path is absolute, returns it: otherwise, returns an absolute path made up of root / this.

Inherited from:
Path
Inherited from:
Path
override def toString(): String
Definition Classes
Path -> Any
Inherited from:
Path
def toURI: URI
Inherited from:
Path
def toURL: URL
Inherited from:
Path
Inherited from:
Path

Equivalent to walkFilter(_ => true).

Equivalent to walkFilter(_ => true).

Inherited from:
Path

Inherited fields

Inherited from:
Path
Inherited from:
Path