Path

fs2.io.file.Path
See thePath companion object
final class Path

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.

Attributes

Companion:
object
Source:
Path.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

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.

Attributes

Source:
Path.scala
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.

Attributes

Source:
Path.scala

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

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

Attributes

Source:
Path.scala

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.

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.

Attributes

Source:
Path.scala

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.

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.

Attributes

Source:
Path.scala
override def equals(that: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Attributes

that

the object to compare against this object for equality.

Returns:

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Any
Source:
Path.scala

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.

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.

Attributes

Source:
Path.scala

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.

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.

Attributes

Source:
Path.scala
override def hashCode: Int

Calculate a hash code value for the object.

Calculate a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Attributes

Returns:

the hash code value for this object.

Definition Classes
Any
Source:
Path.scala

Tells whether or not this path is absolute.

Tells whether or not this path is absolute.

Attributes

Source:
Path.scala
def names: Seq[Path]

Returns the name elements in the path.

Returns the name elements in the path.

Attributes

Source:
Path.scala

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

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

Attributes

Source:
Path.scala

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.

Attributes

Source:
Path.scala

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

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

Attributes

Source:
Path.scala

Resolve the given path against this path.

Resolve the given path against this path.

Attributes

Source:
Path.scala

Resolve the given path against this path.

Resolve the given path against this path.

Attributes

Source:
Path.scala

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

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

Attributes

Source:
Path.scala

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

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

Attributes

Source:
Path.scala

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.

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.

Attributes

Source:
Path.scala

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.

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.

Attributes

Source:
Path.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
PathApi -> Any
Source:
Path.scala

Concrete fields

val toNioPath: Path

Attributes

Source:
Path.scala