DirectoryPath

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

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

append another directory path

append another directory path

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

def /(other: FilePath): FilePath

append a FilePath to this directory

append a FilePath to this directory

Returns:

another FilePath

append a new name to this directory

append a new name to this directory

Returns:

a DirectoryPath

Returns:

an absolute directory path

Returns:

a relative directory path

Returns:

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

def dirPath: String
Returns:

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

Returns:

the DirectoryPath starting from the root

def isAbsolute: Boolean
Returns:

true if this directory path is absolute

def isRelative: Boolean
Returns:

true if this directory path is relative

def isRoot: Boolean
Returns:

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

def parent: Option[DirectoryPath]
Returns:

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

def path: String
Returns:

the path for this file as a / separated string

Returns:

the portion of a dir path that is relative to another

Returns:

the dir path for the first name in the list

def setAbsolute(isAbsolute: Boolean): DirectoryPath
Returns:

modify the absolute status of this dir path

def toFile: File
Returns:

a File for this path

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

Returns:

a FilePath

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product