trait Path extends AnyRef
Represents an absolute or relative path to a node in ZooKeeper.
An absolute path starts with the /
character. All other forms are considered relative. Paths are virtually
identical to those on Unix file systems and may include both .
and ..
parts, indicating the current and parent node,
respectively.
Examples:
"/" "../foo" "/foo/bar" "./foo/../bar"
- Alphabetic
- By Inheritance
- Path
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def isAbsolute: Boolean
Returns
true
if the path is absolute. - abstract def name: String
Returns the name of the last part of the path.
- abstract def normalize: Path
Returns the normalized form of this path.
Returns the normalized form of this path.
The normalization process entails the removal of
.
and..
parts where possible.Examples:
"/.." normalizes to "/" "/foo/.." normalizes to "/" "/foo/../bar" normalizes to "/bar" "./foo" normalizes to "foo" "foo/." normalizes to "foo" "foo/.." normalizes to "" "foo/./bar" normalizes to "foo/bar" "foo/../bar" normalizes to "bar"
- returns
the normalized form of this path
- abstract def parent: Path
Returns the parent path.
- abstract def parentOption: Option[Path]
Returns the parent path wrapped in an
Option
. - abstract def parts: Seq[String]
Returns a sequence containing the parts of the path.
Returns a sequence containing the parts of the path.
Parts represent the node names sandwiched between
/
characters. An absolute path, which is prefixed with/
, always yields a sequence containing an empty string as the first element. The path""
contains no parts, hence an empty sequence is returned. In all other cases, parts are non-empty strings.Examples:
"" parts () "/" parts ("/") "/foo/bar" parts ("", "foo", "bar") "foo/bar" parts ("foo", "bar")
- returns
a sequence containing the parts of path
- abstract def path: String
Returns the path.
Returns the path.
- returns
the path
- abstract def resolve(path: Path): Path
Resolves the given
path
relative to this path. - abstract def resolve(path: String): Path
Resolves the given
path
relative to this path.Resolves the given
path
relative to this path.Path resolution works as follows:
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()