RepositoryManager

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun addRepository(repository: RepositoryData)
Link copied to clipboard
Link copied to clipboard
suspend fun downloadPluginToFile(context: Context, pluginUrl: String, file: File, expectedFileHash: String?): File?
Link copied to clipboard
suspend fun getRepoPlugins(repositoryUrl: String): List<Pair<String, SitePlugin>>?

Gets all plugins from repositories and pairs them with the repository url

Link copied to clipboard
Link copied to clipboard
suspend fun parseRepository(url: String): Repository?
Link copied to clipboard
suspend fun parseRepoUrl(url: String): String?
Link copied to clipboard
suspend fun removeRepository(context: Context, repository: RepositoryData)

Also deletes downloaded repository plugins

Link copied to clipboard
@WorkerThread
fun sha256(file: File): String

Returns a SHA-256 string of the file content. Example: "sha256-b70462c264cb7f90fc2860a8e58d7544ce747ff347d1d11fa093623901853573"