com.loopfor.zookeeper

Path

Related Docs: object Path | package zookeeper

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"
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Path
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def isAbsolute: Boolean

    Returns true if the path is absolute.

  2. abstract def name: String

    Returns the name of the last part of the path.

    Returns the name of the last part of the path.

    Examples:

    "" parent is ""
    "/" parent is ""
    "/foo" parent is "/"
    "/foo/bar" parent is "/foo"
    "foo/bar" parent is "foo"
    returns

    the last part of path, which is an empty string if path is either "" or "/".

  3. 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

  4. abstract def parent: Path

    Returns the parent path.

    Returns the parent path.

    returns

    the parent of path

    Exceptions thrown

    NoSuchElementException if removal of name from path yields "" or "/"

  5. abstract def parentOption: Option[Path]

    Returns the parent path wrapped in an Option.

    Returns the parent path wrapped in an Option.

    returns

    a Some containing the parent of path or None if removal of name from path yields "" or "/"

  6. 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

  7. abstract def path: String

    Returns the path.

    Returns the path.

    returns

    the path

  8. abstract def resolve(path: Path): Path

    Resolves the given path relative to this path.

    Resolves the given path relative to this path.

    path

    the path to resolve against this path

    returns

    a new path in which the givne path is resolved relative to this path

  9. 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:

    • if path is empty, return this path
    • if path starts with /, return path
    • if this path is empty, return path
    • otherwise, return this path + / + path
    path

    the path to resolve against this path

    returns

    a new path in which the given path is resolved relative to this path

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  16. def toString(): String

    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped