CompositeContainer

class CompositeContainer<E : Readable>(containers: List<Container<E>>) : Container<E>

Concatenates several containers.

This can be used for example to serve a publication containing both local and remote resources, and more generally to concatenate different content sources.

The containers will be tested in the given order.

Constructors

Link copied to clipboard
constructor(containers: List<Container<E>>)
constructor(vararg containers: Container<E>)

Properties

Link copied to clipboard
open override val entries: Set<Url>

List of all the container entries.

Link copied to clipboard

Direct source to this container, when available.

Functions

Link copied to clipboard
open override fun close()

Closes this object and releases any resources associated with it. If the object is already closed then invoking this method has no effect.

Link copied to clipboard
open operator override fun get(url: Url): E?

Returns the entry at the given url or null if there is none.

Link copied to clipboard
open operator override fun iterator(): Iterator<Url>
Link copied to clipboard
inline suspend fun <S> Container<Readable>.readDecodeOrNull(url: Url, decode: (ByteArray) -> Try<S, DecodeError>): S?