SergeNova
Member
Hello everyone, here is my first post here. I want to know about DownloadAndSave from Erel, is this Sub <<DownloadAndSave>> is called automatically when the user wants to download a file? Thank you, your help will be appreciated
Sub DownloadAndSave (Url As String, Dir As String, FileName As String) As ResumableSub
Dim j As HttpJob
j.Initialize("", Me)
j.Download(Url)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim out As OutputStream = File.OpenOutput(Dir, FileName, False)
File.Copy2(j.GetInputStream, out)
out.Close
End If
j.Release
Return j.Success
End Sub
Sub DownloadAndSave (Url As String, Dir As String, FileName As String) As ResumableSub
Dim j As HttpJob
j.Initialize("", Me)
j.Download(Url)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim out As OutputStream = File.OpenOutput(Dir, FileName, False)
File.Copy2(j.GetInputStream, out)
out.Close
End If
j.Release
Return j.Success
End Sub