Dotty Documentation

0.5.0-bin-SNAPSHOT

class Path
extends Object

The Path constructor is private so we can enforce some semantics regarding how a Path might relate to the world.

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

[-] Constructors

Path ( jpath: JPath )

[-] Members

[+] val jpath : JPath
[+] val separator : Char
[+] val separatorStr : String
[+] def / ( child: String ) : Path
[+] def / ( child: Path ) : Path
[+] def / ( child: Directory ) : Directory
[+] def / ( child: File ) : File
[+] def addExtension ( ext: String ) : Path
[+] def canRead : Boolean
[+] def canWrite : Boolean
[+] def changeExtension ( ext: String ) : Path
[+] def createDirectory ( force: Boolean , failIfExists: Boolean ) : Directory
[+] def createFile ( failIfExists: Boolean ) : File
[+] def delete ( ) : Unit
[+] def deleteRecursively ( ) : Boolean

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

[+] def endsWith ( other: Path ) : Boolean
[+] override def equals ( other: Any ) : Boolean
[+] def exists : Boolean
[+] def extension : String
[+] def hasExtension ( ext: String , exts: [ String ] ) : Boolean
[+] override def hashCode ( ) : Int
[+] def ifDirectory ( f: Directory => T ) : Option [ T ]
[+] def ifFile ( f: File => T ) : Option [ T ]
[+] def isAbsolute : Boolean
[+] def isDirectory : Boolean
[+] def isEmpty : Boolean
[+] def isFile : Boolean
[+] def isFresher ( other: Path ) : Boolean
[+] def isSame ( other: Path ) : Boolean
[+] def lastModified : FileTime
[+] def length : Long
[+] def name : String
[+] def normalize : Path
[+] def parent : Directory
[+] def parents : List [ Directory ]
[+] def path : String
[+] def relativize ( other: Path ) : Path
[+] def resolve ( other: Path ) : Path
[+] def segments : List [ String ]
[+] def stripExtension : String
[+] def toAbsolute : Path
[+] def toAbsoluteWithRoot ( root: Path ) : Path

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

[+] def toCanonical : Path
[+] def toDirectory : Directory
[+] def toFile : File
[+] override def toString ( ) : String
[+] def toURI : URI
[+] def toURL : URL
[+] def truncate ( ) : Boolean
[+] private def tryCreate ( create: => JPath ) : Boolean
[+] def walk : Iterator [ Path ]

Equivalent to walkFilter(_ => true).

[+] def walkFilter ( cond: Path => Boolean ) : Iterator [ Path ]