download

fun download(url: String, target: File): Flow<DownloadProgress>

Downloads url into target, resuming from <target>.tmp if a partial exists, emitting a DownloadProgress per buffer. On success the .tmp is renamed to target; on cancellation the .tmp is left in place for the next resume.