Packages

final class Path extends PathApi

Path to a file or directory on a file system.

The path API is inspired by the java.nio.file.Path API. On the JVM, a NIO path can be converted to an FS2 path via Path.fromNioPath(p) and likewise an FS2 path can be converted to a NIO path via p.toNioPath.

(When using this class on Node.js, the fromNioPath and toNioPath methods are not accessible.)

Generally, most methods have the same behavior as their NIO counterparts, though there are some slight differences -- e.g., resolve normalizes.

Source
Path.scala
Linear Supertypes
PathApi, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Path
  2. PathApi
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def /(path: Path): Path

    Joins the given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.

    Joins the given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.

    Definition Classes
    Path → PathApi
  4. def /(name: String): Path

    Joins the given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.

    Joins the given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.

    Definition Classes
    Path → PathApi
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def absolute: Path

    Returns a Path object representing the absolute path of this path.

    Returns a Path object representing the absolute path of this path.

    Definition Classes
    Path → PathApi
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  9. def endsWith(path: Path): Boolean

    Tests if this path ends with the given path.

    Tests if this path ends with the given path. If the given path has N elements, and no root component, and this path has N or more elements, then this path ends with the given path if the last N elements of each path, starting at the element farthest from the root, are equal.

    Definition Classes
    Path → PathApi
  10. def endsWith(path: String): Boolean

    Tests if this path ends with the given path.

    Tests if this path ends with the given path. If the given path has N elements, and no root component, and this path has N or more elements, then this path ends with the given path if the last N elements of each path, starting at the element farthest from the root, are equal.

    Definition Classes
    Path → PathApi
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(that: Any): Boolean
    Definition Classes
    Path → AnyRef → Any
  13. def extName: String

    Returns the extension of the path, from the last occurrence of the .

    Returns the extension of the path, from the last occurrence of the . (period) character to end of string in the last portion of the path. If there is no . in the last portion of the path, or if there are no . characters other than the first character of the filename of path, an empty string is returned.

    Definition Classes
    Path → PathApi
  14. def fileName: Path

    Returns the name of the file or directory denoted by this path as a Path object.

    Returns the name of the file or directory denoted by this path as a Path object. The file name is the farthest element from the root in the directory hierarchy.

    Definition Classes
    Path → PathApi
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  16. def hashCode(): Int
    Definition Classes
    Path → AnyRef → Any
  17. def isAbsolute: Boolean

    Tells whether or not this path is absolute.

    Tells whether or not this path is absolute.

    Definition Classes
    Path → PathApi
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def names: Seq[Path]

    Returns the name elements in the path.

    Returns the name elements in the path.

    Definition Classes
    Path → PathApi
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def normalize: Path

    Returns a path that is this path with redundant name elements eliminated.

    Returns a path that is this path with redundant name elements eliminated.

    Definition Classes
    Path → PathApi
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  24. def parent: Option[Path]

    Returns the parent path, or None if this path does not have a parent.

    Returns the parent path, or None if this path does not have a parent.

    Definition Classes
    Path → PathApi
  25. def relativize(path: Path): Path

    Constructs a relative path between this path and a given path.

    Constructs a relative path between this path and a given path.

    Definition Classes
    Path → PathApi
  26. def resolve(path: Path): Path

    Resolve the given path against this path.

    Resolve the given path against this path.

    Definition Classes
    Path → PathApi
  27. def resolve(name: String): Path

    Resolve the given path against this path.

    Resolve the given path against this path.

    Definition Classes
    Path → PathApi
  28. def resolveSibling(path: Path): Path

    Resolves the given path against this path's parent path.

    Resolves the given path against this path's parent path.

    Definition Classes
    Path → PathApi
  29. def resolveSibling(name: String): Path

    Resolves the given path against this path's parent path.

    Resolves the given path against this path's parent path.

    Definition Classes
    Path → PathApi
  30. def startsWith(path: Path): Boolean

    Tests if this path starts with the given path.

    Tests if this path starts with the given path. This path starts with the given path if this path's root component starts with the root component of the given path, and this path starts with the same name elements as the given path. If the given path has more name elements than this path then false is returned.

    Definition Classes
    Path → PathApi
  31. def startsWith(path: String): Boolean

    Tests if this path starts with the given path.

    Tests if this path starts with the given path. This path starts with the given path if this path's root component starts with the root component of the given path, and this path starts with the same name elements as the given path. If the given path has more name elements than this path then false is returned.

    Definition Classes
    Path → PathApi
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. val toNioPath: java.nio.file.Path
  34. def toString: String
    Definition Classes
    Path → PathApi → AnyRef → Any
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from PathApi

Inherited from AnyRef

Inherited from Any

Ungrouped