k24:k24.2:k24.2.6:start
24.2.6 Class Download (gb.net.curl)
The Download class returns the properties that were set statically when a download was defined using the HTTP or FTP protocol, or are set interactively when a file is actively downloaded.
24.2.6.1 Properties
The Download class has these properties:
| Property | Data type | Description |
|---|---|---|
| Current | Long | The number of bytes already downloaded is read out. |
| ErrorText | String | The error text is read out. |
| Key | String | Read out the key. |
| Path | String | The path where the download file was saved is read. |
| Size | Long | The number of bytes that have to be downloaded is read out. |
| State | Integer | The status of the download is read out. |
| Type | Integer | The type of the download is read out. |
| Url | String | The URL specified in the function DownloadManager.Add(URL, optional key) is read out. |
Table 24.2.6.1.1 : Properties of the class Download
Notes:
- Path: The base directory where the downloaded files are temporarily stored is → /tmp/gambas.<user_id>/<program_id>. The file names of the downloaded files have the format: index.tmp. Index starts at 1 and is incremented.
- Type: The following three constants: Download.Unknown (0), Download.Http (1) or Download.Ftp (2) are returned. Download.Http and Download.Ftp are determined internally from the specification of the protocol (HTTP, FTP) in the URL.
For the download status, these integer constants are returned:
Download.NotReady (0), Download.Ready (1), Download.Downloading (2), Download.Finnish (3), Download.Error (4).
The Download class has neither methods nor events.
k24/k24.2/k24.2.6/start.txt · Last modified: by 127.0.0.1
