findManifest

abstract fun findManifest(candidates: List<Pair<ManifestFormat, String>>): Pair<ManifestFormat, InputStream>?

Find an asset manifest present as a resource in the application classpath from the set of provided candidates, each of which represents a potential path and ManifestFormat.

If a manifest is found at any of the candidate locations, a pair of ManifestFormat/InputStream is returned, which can be used to load a de-serializer and run it. If no manifest is found or anything else goes wrong (i.e. a manifest is found but it is in the wrong format), null is returned.

Return

Pair of the located ManifestFormat and an InputStream, or null if no manifest was found.

Parameters

candidates

Candidate paths and ManifestFormat values where we should search for the manifest.


open fun findManifest(): Pair<ManifestFormat, InputStream>?

Find an asset manifest embedded within the scope of the current application; search in the default path locations, and if no manifest is found, return null; otherwise, return the expected format of the found manifest, and an input stream to consume it.

Return

Pair carrying the found ManifestFormat and an InputStream to consume it, or null if no manifest could be located in the default classpath resource locations.