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
- Alphabetic
- By Inheritance
- Path
- PathApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
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
-
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
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
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
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(that: Any): Boolean
- Definition Classes
- Path → AnyRef → Any
-
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
-
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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- Path → AnyRef → Any
-
def
isAbsolute: Boolean
Tells whether or not this path is absolute.
Tells whether or not this path is absolute.
- Definition Classes
- Path → PathApi
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
names: Seq[Path]
Returns the name elements in the path.
Returns the name elements in the path.
- Definition Classes
- Path → PathApi
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
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
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
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
-
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
-
def
resolve(path: Path): Path
Resolve the given path against this path.
Resolve the given path against this path.
- Definition Classes
- Path → PathApi
-
def
resolve(name: String): Path
Resolve the given path against this path.
Resolve the given path against this path.
- Definition Classes
- Path → PathApi
-
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
-
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
-
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
-
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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val toNioPath: java.nio.file.Path
-
def
toString: String
- Definition Classes
- Path → PathApi → AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated