android-components / mozilla.components.browser.session / Download

Download

data class Download (source)

Value type that represents a Download.

Constructors

<init>

Download(url: String, fileName: String? = null, contentType: String? = null, contentLength: Long? = null, userAgent: String? = null, destinationDirectory: String = Environment.DIRECTORY_DOWNLOADS)

Value type that represents a Download.

Properties

contentLength

val contentLength: Long?

The file size reported by the server.

contentType

val contentType: String?

Content type (MIME type) to indicate the media type of the download.

destinationDirectory

val destinationDirectory: String

The matching destination directory for this type of download.

fileName

val fileName: String?

A canonical filename for this download.

url

val url: String

The full url to the content that should be downloaded.

userAgent

val userAgent: String?

The user agent to be used for the download.