|
|
|
|
|
WLanguage procedure called by SCPGetFile WLanguage procedure ("callback") called by SCPGetFile when retrieving a file on a local computer using the Secure Copy Protocol (SCP). This procedure gets the file transfer progress status on the local computer.
sessionSSH is sshSession
sessionSSH.Address = "monserveur.com"
sessionSSH.Port = 22
sessionSSH.User = "username"
sessionSSH.UserPassword = "password"
sessionSSH.ConnectionTimeout = 2 s
sNomFichier is string = "compta_janvier.docx"
sCheminFichierLocal is string = fExeDir() + [fSep()] + sNomFichier
sCheminFichierDistant is string = "~/compta/" + sNomFichier
IF NOT SCPGetFile(sessionSSH, sCheminFichierDistant, ...
sCheminFichierLocal, Progression) THEN
Error(ErrorInfo(errFullDetails))
ELSE
Info("Récupération terminée")
END
INTERNAL PROCEDURE Progression(nTailleTotale, nTailleEnCours)
Trace(nTailleEnCours + "/" + nTailleTotale)
END
Syntax
SCPGetFile_Callback(<Total size> , <Size sent>)
<Total size>: Integer Total size (in bytes) of the file to get. <Size sent>: Integer Size (in bytes) of the file that has already been retrieved.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|