case class FilePath(name: String, parent: Option[FilePath]) extends Ordered[FilePath] with Product with Serializable
A representation of a FilePath, made of a series of path segments, ending with a name.
A FilePath is represented in memory as a "name" (the final part of the path), and an
optional reference to a parent. In this manner, it is comparable to a scala List
,
except that it is reversed.
The purpose of this class is to represent the same thing as a java.io.File or a java.nio.file.Path, but without the intention of actually interacting with any filesystem. FilePath is purely representational data.
- Alphabetic
- By Inheritance
- FilePath
- Serializable
- Product
- Equals
- Ordered
- Comparable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def /(childPath: FilePath): FilePath
Returns a new FilePath that represents the
childPath
relative to this path.Returns a new FilePath that represents the
childPath
relative to this path. For example:FilePath("a", "b") / FilePath("c", "d") == FilePath("a", "b", "c", "d")
- def /(childName: String): FilePath
Returns a new FilePath whose name is
childName
and whose parent is this path. - def <(that: FilePath): Boolean
- Definition Classes
- Ordered
- def <=(that: FilePath): Boolean
- Definition Classes
- Ordered
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def >(that: FilePath): Boolean
- Definition Classes
- Ordered
- def >=(that: FilePath): Boolean
- Definition Classes
- Ordered
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compare(that: FilePath): Int
- Definition Classes
- FilePath → Ordered
- def compareTo(that: FilePath): Int
- Definition Classes
- Ordered → Comparable
- def endsWith(that: FilePath): Boolean
Returns
true
if this path ends with the segments ofthat
path.Returns
true
if this path ends with the segments ofthat
path. For example: a path like "a/b/c/d/e/f" ends with "d/e/f". - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val name: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val parent: Option[FilePath]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def reverseSegmentsIterator: Iterator[String]
- def segments: List[String]
A collection of the segments in this path, ending with the
name
- def startsWith(that: FilePath): Boolean
Returns
true
if this path starts with the segments ofthat
path.Returns
true
if this path starts with the segments ofthat
path. For example: a path like "a/b/c/d/e/f" starts with "a/b/c". - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toFile(parent: File): File
Converts this path to a java-style File, relative to the given
parent
file.Converts this path to a java-style File, relative to the given
parent
file. For example:FilePath("a", "b", "c").toFile(File("/some/dir")) == File("/some/dir/a/b/c")
- def toFile: File
Converts this path to a java-style relative File.
- def toString(): String
- Definition Classes
- FilePath → AnyRef → Any
- def toUnixPath: String
Converts this path to a String that represents the path, with a forward slash ('/') as the separator.
Converts this path to a String that represents the path, with a forward slash ('/') as the separator.
FilePath("a", "b", "c") => "a/b/c"
- def toWindowsPath: String
Converts this path to a String that represents the path, with back slashes ('\') as separators.
Converts this path to a String that represents the path, with back slashes ('\') as separators.
FilePath("a", "b", "c") => "a\b\c"
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()