User Tools

Site Tools


Sidebar

Network and communication

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:

PropertyData typeDescription
CurrentLongThe number of bytes already downloaded is read out.
ErrorTextStringThe error text is read out.
KeyStringRead out the key.
PathStringThe path where the download file was saved is read.
SizeLongThe number of bytes that have to be downloaded is read out.
StateIntegerThe status of the download is read out.
TypeIntegerThe type of the download is read out.
UrlStringThe 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.

The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k24/k24.2/k24.2.6/start.txt · Last modified: 16.08.2022 (external edit)

Page Tools