Class: | FTP_SERVICE |
Type | Character |
Direction | Input |
LOCAL loFTP SET PROCEDURE TO ftp.prg ADDITIVE loFTP=CREATEOBJECT('ftp_service') IF loFTP.OpenInternet("ABONNE", "PWD", "10.10.10.10", "21") IF !loFTP.GetFTPFile("anyt.xt","local.txt") IF loFTP.IsGlobalOffline()=1 && Offline mode IF loFTP.GoOnline("ftp://10.10.10.10/any.txt") IF loFTP.GetFTPFile("any.txt","local.txt") ?STRTRAN("File %File% downloaded","%File%","local.txt") ENDIF ENDIF ENDIF ENDIF =loFTP.CloseInternet() ENDIF RELEASE PROCEDURE ftp.prg
LPARAMETERS INP lcURL LOCAL lnHWNDHandle, fResult IF This.LoadAPIFuncs() != ERROR_SUCCESS RETURN .F. ENDIF IF TYPE("lcURL") != "C" RETURN .F. ENDIF lcURL = lcURL + cNULL lnHWNDHandle = 0 =This.BeforeGoOnline(@lcURL) fResult = InternetGoOnline(@lcURL, lnHWNDHandle, 0) =This.GetExtendedError() =This.AfterGoOnline(@lcURL,fResult) RETURN fResult # 0