Route

value class Route(routeStr: String)(source)

A class which represents a route text value, e.g. "a/b/slug", with relevant utility methods.

A route that begins with a "/" is considered absolute or otherwise relative. A route that ends with a "/" indicates that the route name is unspecified and the final slug should be taken from some reference file that the route will be associated with.

Constructors

Link copied to clipboard
constructor(routeStr: String)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun resolve(referencePath: String): String

Resolve a route with a reference path to some file to generate an absolute path.

Link copied to clipboard
open override fun toString(): String