---
title: "DownloadListener"
sidebar_label: "DownloadListener"
description: "Kotlin binding reference: DownloadListener."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.modelverse](../index.md)/[DownloadListener](index.md)

# DownloadListener

[common]\
fun interface [DownloadListener](index.md)

Hears a download's progress ([Modelverse.snapshot](../Modelverse/snapshot.md)): one call per transfer step of each file the resolve fetches, on the calling thread, with the file's bytes and the plan's. Return `false` to stop the download: the call then refuses with the hub's own cancel status; an exception the listener lets escape stops it the same way. A snapshot served from the cache reports nothing, since a cached file never joins the plan.

## Functions

| Name | Summary |
|---|---|
| [onProgress](onProgress.md) | [common]<br>abstract fun [onProgress](onProgress.md)(event: [DownloadEvent](../DownloadEvent/index.md)): [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) |