ReadOnlyMediaStorage

A storage of Media that can only be read. The main purpose is exporting media to the output files. For example, an image ![](img.png) references a local image. In this case, the HTML renderer would normally produce a <img src="img.png"> tag, but the image would not be found in the output directory. This means that the image must be copied to the output directory (not necessarily under the same name), and the tag must reference the copied image path instead.

See also

Inheritors

Properties

Link copied to clipboard
abstract val all: Set<StoredMedia>

All the stored entries.

Link copied to clipboard
open val isEmpty: Boolean

Whether this storage does not contain any media.

Link copied to clipboard
abstract val name: String

The name of the storage. It also defines the name of the subdirectory in the output directory where media from this storage is saved.

Functions

Link copied to clipboard
abstract fun resolve(path: String): StoredMedia?

Resolves a media by its path.

Link copied to clipboard
abstract fun toResource(): OutputResource

Converts this storage to an OutputResource. This is used to export all media to the output directory. Ideally, this method returns an com.quarkdown.core.pipeline.output.OutputResourceGroup which contains all media inside of it.