DownloadEvent

Types

Link copied to clipboard
data class Completed(val path: String, val sizeBytes: Long, val sha256: String, val resumedFromBytes: Long, val alreadyPresent: Boolean) : DownloadEvent

The verified file is at path.

Link copied to clipboard
data class Progress(val downloadedBytes: Long, val totalBytes: Long?) : DownloadEvent

downloadedBytes of totalBytes (null if the server did not say) are on disk.

Link copied to clipboard
data class Started(val resumedFromBytes: Long, val totalBytes: Long?) : DownloadEvent

The download started; resumedFromBytes bytes were already present in the partial file.

Link copied to clipboard
data class Verifying(val sizeBytes: Long) : DownloadEvent

All bytes are on disk; the SHA-256 is being computed.