RevisionedFile

Describes a revisioned file, meaning its path is unique based on its content.

Revisioned files must be created by using one of the various extension functions on WriteableRevFileRegistry. create is the most general function to create a revisioned file, while source provides interop with kotlinx.io.

Depending on your platform, convenient factories like resource or file are also available.

package com.example

object AppAssets : RevFileRegistry("/assets/") {
val main: RevisionedFile = resource("main.js")
val styles: RevisionedFile = resource("styles.css")
}

Properties

Link copied to clipboard

The content type of this file, e.g. text/javascript

Link copied to clipboard

The computed integrity for this file, e.g. sha256-XHyohF/kGOwoCv4RWnG0Epk/njHhmJdiOntPLZiMhQE=.

Link copied to clipboard

The full path of this file, e.g. /assets/example.5c7ca8845f.js

Functions

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