final case class Path extends Product with Serializable
Path is an immutable representation of the path of a URL. Internally it stores each element of a path in a sequence of text, together with flags on whether there are leading and trailing slashes in the path. This allows for a combination of precision and performance and supports a rich API.
- Self Type
- Path
- Alphabetic
- By Inheritance
- Path
- Serializable
- Serializable
- Product
- Equals
- 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
++(that: Path): Path
Combines two paths together to create a new one, having a leading slash if only the left path has a leading slash, and a trailing slash if only the right path has a trailing slash.
Combines two paths together to create a new one, having a leading slash if only the left path has a leading slash, and a trailing slash if only the right path has a trailing slash. Note that if you concat the empty path to any other path, either on the left or right hand side, you get back that same path unmodified.
-
def
/(name: String): Path
Appends a segment at the end of the path.
Appends a segment at the end of the path.
If there is already a trailing slash when you append a segment, then the trailing slash will be removed (more precisely, it becomes the slash that separates the existing path from the new segment).
-
def
/:(name: String): Path
Prepends the path with the provided segment.
Prepends the path with the provided segment.
If there is already a leading slash when you prepend a segment, then the leading slash will be removed (more precisely, it becomes the slash that separates the new segment from the existing path).
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addLeadingSlash: Path
Prepends a leading slash to the path.
-
def
addTrailingSlash: Path
Appends a trailing slash to the path.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
def
concat(other: Path): Path
Named alias to
++operator. -
def
drop(n: Int): Path
Drops the first n segments from the path, treating both leading and trailing slashes as segments.
-
def
dropLeadingSlash: Path
Drops the leading slash if available.
-
def
dropRight(n: Int): Path
Drops the last n segments from the path, treating both leading and trailing slashes as segments.
-
def
dropTrailingSlash: Path
Drops the trailing slash if available.
-
def
encode: String
Encodes the current path into a valid string.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(that: Any): Boolean
- Definition Classes
- Path → Equals → AnyRef → Any
- val flags: Flags
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hasLeadingSlash: Boolean
Checks if the path contains a leading slash.
-
def
hasTrailingSlash: Boolean
Checks if the path contains a trailing slash.
-
def
hashCode(): Int
- Definition Classes
- Path → AnyRef → Any
-
def
isEmpty: Boolean
Checks if the path is equal to "".
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isRoot: Boolean
Checks if the path is equal to "/".
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nonEmpty: Boolean
Checks if the path is not equal to "".
-
def
normalize: Path
Normalizes the path for proper equals/hashCode treatment.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
def
removeDotSegments: Path
RFC 3986 § 5.2.4 Remove Dot Segments
RFC 3986 § 5.2.4 Remove Dot Segments
- returns
the Path with
.and..resolved and removed
-
def
reverse: Path
Creates a new path from this one with it's segments reversed.
- val segments: Chunk[String]
-
def
size: Int
Returns the "size" of a path, which counts leading and trailing slash, if present.
-
def
startsWith(other: Path): Boolean
Checks if the path starts with the provided path
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
take(n: Int): Path
Returns a new path containing the first n segments of the path, treating both leading and trailing slashes as segments.
-
def
toString(): String
- Definition Classes
- Path → AnyRef → Any
- lazy val unapply: Option[(String, Path)]
- lazy val unapplyRight: Option[(Path, String)]
-
def
unnest(prefix: Path): Path
Unnests a path that has been nested at the specified prefix.
Unnests a path that has been nested at the specified prefix. If the path is not nested at the specified prefix, the same path is returned.
-
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( ... )