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

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

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Http](index.md)/[downloadFile](downloadFile.md)

# downloadFile

[common]\
fun [downloadFile](downloadFile.md)(url: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), destPath: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), options: [DownloadOptions](../DownloadOptions/index.md) = DEFAULTS): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)

Download [url](downloadFile.md) to [destPath](downloadFile.md) and answer the path written; a partial file resumes when [DownloadOptions.resume](../DownloadOptions/resume.md) is set.