class Path extends AnyRef
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.
- Alphabetic
- By Inheritance
- Path
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def /(child: File): File
- def /(child: Directory): Directory
-
def
/(child: Path): Path
Creates a new Path with the specified path appended.
Creates a new Path with the specified path appended. Assumes the type of the new component implies the type of the result.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addExtension(ext: String): Path
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def canRead: Boolean
- def canWrite: Boolean
- def changeExtension(ext: String): Path
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def createDirectory(force: Boolean = true, failIfExists: Boolean = false): Directory
- def createFile(failIfExists: Boolean = false): File
- def delete(): Boolean
-
def
deleteRecursively(): Boolean
Deletes the path recursively.
Deletes the path recursively. Returns false on failure. Use with caution!
- def endsWith(other: Path): Boolean
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(other: Any): Boolean
- Definition Classes
- Path → AnyRef → Any
- def exists: Boolean
- def extension: String
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hasExtension(ext: String, exts: String*): Boolean
-
def
hashCode(): Int
- Definition Classes
- Path → AnyRef → Any
- def ifDirectory[T](f: (Directory) ⇒ T): Option[T]
- def ifFile[T](f: (File) ⇒ T): Option[T]
- def isAbsolute: Boolean
- def isDirectory: Boolean
- def isEmpty: Boolean
- def isFile: Boolean
- def isFresher(other: Path): Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isSame(other: Path): Boolean
- val jfile: java.io.File
- def lastModified: Long
- def length: Long
- def name: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def normalize: Path
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
parent: Directory
- returns
The path of the parent directory, or root if path is already root
- def parents: List[Directory]
- def path: String
- def relativize(other: Path): Path
- def resolve(other: Path): Path
- def segments: List[String]
- val separator: Char
- val separatorStr: String
- def stripExtension: String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- 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
-
def
toString(): String
- Definition Classes
- Path → AnyRef → Any
- def toURI: URI
- def toURL: URL
- def truncate(): Boolean
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
walk: Iterator[Path]
Equivalent to walkFilter(_ => true).
-
def
walkFilter(cond: (Path) ⇒ Boolean): Iterator[Path]
If this path is a directory, recursively iterate over its contents.
If this path is a directory, recursively iterate over its contents. The supplied condition is a filter which is applied to each element, with that branch of the tree being closed off if it is false. So for example if the condition is false for some subdirectory, nothing under that directory will be in the Iterator. If it's true, all files for which the condition holds and are directly in that subdirectory are in the Iterator, and all sub-subdirectories are recursively evaluated