android-components / mozilla.components.feature.pwa / ManifestStorage

ManifestStorage

class ManifestStorage (source)

Disk storage for WebAppManifest. Other components use this class to reload a saved manifest.

Constructors

Name Summary
<init> ManifestStorage(context: <ERROR CLASS>)
Disk storage for WebAppManifest. Other components use this class to reload a saved manifest.

Functions

Name Summary
loadManifest suspend fun loadManifest(startUrl: String): WebAppManifest?
Load a Web App Manifest for the given URL from disk. If no manifest is found, null is returned.
removeManifests suspend fun removeManifests(startUrls: List<String>): <ERROR CLASS>
Delete all manifests associated with the list of URLs.
saveManifest suspend fun saveManifest(manifest: WebAppManifest): <ERROR CLASS>
Save a Web App Manifest to disk.
updateManifest suspend fun updateManifest(manifest: WebAppManifest): <ERROR CLASS>
Update an existing Web App Manifest on disk.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.