wwFtpClient::OnFtpBufferUpdate

A progress event that is fired as files are downloaded or uploaded providing basic progress information as the upload proceeds.

To make this work you need to:

  • Create an Event Handler Class that implements OnFtpBufferUpdate()
  • Assign it to the FTP Object's loFtp.oProgressEventObject
loFtp.oProgressEventObject = CREATEOBJECT("FtpProgress")

*** assignment must happen BEFORE .Connect
loFtp.Connect()

...
DEFINE CLASS FtpProgress as Custom

FUNCTION OnFtpBufferUpdate(lnPercent, lnDownloadedBytes, lcRemotePath, lcMode)
  lcMsg = lcMode + ": " + TRANSFORM(lnPercent) + "% complete. " + lcRemotePath + " - " + TRANSFORM(lnDownloadedBytes) + " bytes"
  ? "*** " + lcMsg
ENDFUNC

ENDFUNC
o.OnFtpBufferUpdate(lnPercentComplete, lnDownloadedBytes, lcRemotePath, lcMode)

Parameters

lnPercentComplete
The percentage complete for the upload in progress. Value is an Integer between 0-100.

lnDownloadedBytes
Number of bytes that have been downloaded or uploaded so far.

lcRemotePath
The remote path of the file processing

lcMode
Current process mode:

  • download
  • upload

See also:

Class wwSftpClient |

© West Wind Technologies, 1996-2024 • Updated: 06/01/24
Comment or report problem with topic