feat: add getPercentComplete / getCurrentBytesPerSecond / getEndTime to DownloadItem (#42805)

feat: getCurrentSpeed / getPercentComplete / getEndTime on DownloadItem
This commit is contained in:
Theo Gravity 2024-07-15 16:32:44 -07:00 committed by GitHub
parent 0fddfd1b28
commit bab3fcc9ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 46 additions and 1 deletions

View file

@ -145,6 +145,10 @@ Returns `string` - The file name of the download item.
disk. If user changes the file name in a prompted download saving dialog, the
actual name of saved file will be different.
#### `downloadItem.getCurrentBytesPerSecond()`
Returns `Integer` - The current download speed in bytes per second.
#### `downloadItem.getTotalBytes()`
Returns `Integer` - The total size in bytes of the download item.
@ -155,6 +159,10 @@ If the size is unknown, it returns 0.
Returns `Integer` - The received bytes of the download item.
#### `downloadItem.getPercentComplete()`
Returns `Integer` - The download completion in percent.
#### `downloadItem.getContentDisposition()`
Returns `string` - The Content-Disposition field from the response
@ -184,6 +192,10 @@ Returns `string` - ETag header value.
Returns `Double` - Number of seconds since the UNIX epoch when the download was
started.
#### `downloadItem.getEndTime()`
Returns `Double` - Number of seconds since the UNIX epoch when the download ended.
### Instance Properties
#### `downloadItem.savePath`