FTP_Finished

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > FTP (File Transfer Profotol) >

FTP_Finished

 

Description

 

Check the current status.

 

Syntax

 

n = FTP_Finished

 

Returns

 

Number

Return < 0 : An error has occurred. Call FTP_GetErrorStrin(n).

Return = 0 : The status is finished (idle).

Return > 0 : The status is not yet finished.

 

Parameters

 

Name

Type

Optional

Meaning





 

Remarks

 

Restrictions

 

See also

 

Examples

 

'-------------------------------------------------------------------------

'Start DownLoad process Async mode

'-------------------------------------------------------------------------

'---ASync mode: a loop must be setup because script execution control

'---is immediately returned to the script

PrintL "---Start downloading in %FTP_SET_ASYNC mode---"

Dim yPos As Long

FileName = "screen001.jpg"

ftpResult = FTP_GetFile(FileName, %FTP_SET_ASYNC)

PrintL

yPos = Console_GetCursorY

Do

  DoEvents

  PrintAt(FileName & " bytes: " & FTP_GetNumber(%FTP_GET_FILE_BYTES_RCVD), 1, yPos)

Loop While FTP_Finished > 0   ' Loop until FTP operation is finished

 

PrintL "FTP finished is: " + FTP_Finished

PrintL "----------------------------------------------"