class HttpDownloadOptions
source · line 12public
public class HttpDownloadOptions internal constructor(
/**
* Whether atomic publication may replace an existing destination.
*/
public val replaceExisting: Boolean = false,
/**
* Whether file contents are synchronized before the final commit.
*/
public val syncOnCommit: Boolean = false,
/**
* The positive byte-buffer size used while streaming to disk.
*/
public val bufferSize: Long = 8192L,
/**
* Suspend callback for written-byte progress; it participates in cancellation and failure
* cleanup.
*/
public val onProgress: suspend (HttpDownloadProgress) -> Unit = suspend { _ -> }
)
Download publication, buffering, and progress policy. Completion atomically installs the destination; failures retain the prior destination.
Extensions
public fun HttpDownloadOptions.copy(configure: HttpDownloadOptionsBuilder.() -> Unit = {}): HttpDownloadOptions· scoop:scoop.http.client:0.1.0
property replaceExisting
source · line 16public
public val replaceExisting: Boolean = false
get: public read-only
Whether atomic publication may replace an existing destination.
property onProgress
source · line 29public
public val onProgress: suspend (HttpDownloadProgress) -> Unit = suspend { _ -> }
get: public read-only
Suspend callback for written-byte progress; it participates in cancellation and failure cleanup.
property bufferSize
source · line 24public
public val bufferSize: Long = 8192L
get: public read-only
The positive byte-buffer size used while streaming to disk.
property syncOnCommit
source · line 20public
public val syncOnCommit: Boolean = false
get: public read-only
Whether file contents are synchronized before the final commit.