DirectoryPath

org.specs2.io.DirectoryPath
See theDirectoryPath companion object
case class DirectoryPath(dirs: Vector[FileName], absolute: Boolean)

Representation of a directory path which can be relative or absolute

It is a list of FileNames and we can append other DirectoryPaths or FilePaths to it If the list is empty, this means we are at the root

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

append another directory path

append another directory path

DirectoryPath.Root plays the role an empty element for this operation

Attributes

def /(other: FilePath): FilePath

append a FilePath to this directory

append a FilePath to this directory

Attributes

Returns

another FilePath

def /(name: FileName): DirectoryPath

append a new name to this directory

append a new name to this directory

Attributes

Returns

a DirectoryPath

Attributes

Returns

an absolute directory path

Attributes

Returns

a relative directory path

Attributes

Returns

either the parent directory or the root if we already are at the root

def dirPath: String

Attributes

Returns

the path for this file as a / separated string, with a final /

Attributes

Returns

the DirectoryPath starting from the root

def isAbsolute: Boolean

Attributes

Returns

true if this directory path is absolute

def isRelative: Boolean

Attributes

Returns

true if this directory path is relative

def isRoot: Boolean
def name: FileName

Attributes

Returns

the last file name of the list or . if the list is empty

def parent: Option[DirectoryPath]

Attributes

Returns

the parent directory for this directory, none if we are at the root

def path: String

Attributes

Returns

the path for this file as a / separated string

Attributes

Returns

the portion of a dir path that is relative to another

Attributes

Returns

the dir path for the first name in the list

def setAbsolute(isAbsolute: Boolean): DirectoryPath

Attributes

Returns

modify the absolute status of this dir path

def toFile: File

Attributes

Returns

a File for this path

Attributes

Returns

interpret this DirectoryPath as a FilePath, which might be /. if this DirectoryPath is Root

def |(name: FileName): FilePath

append a new name to this directory but

append a new name to this directory but

Attributes

Returns

a FilePath

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product