cArqDestDestination below RootPath in documented context.
AdvPL GuideFTPDownload(cArqDest, cArqOrig) --> lRetCopies a remote file to a local destination.
Destination comes first and remote source second. The manual places the destination below Protheus RootPath rather than the workstation Downloads folder. Validate name, directory and replacement policy; the source establishes no atomic write guarantee. The example prepares an uninvoked callback. The caller must own the test FTP session and its paths; no server or credentials are embedded. (Sources: refs. 1–2.)
FTPDownload(cArqDest, cArqOrig) --> lRetcArqDestDestination below RootPath in documented context.
cArqOrigAllowed remote name.
Logical operation success.
#Include "Protheus.ch"
User Function Ed401()
Local bAction := {|cTarget,cSource| FTPDownload(cTarget,cSource)}
// Do not evaluate: caller must prepare session and paths.
Return NilPrepared block; no FTP operation performed. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.