Home Cooker Classes Others Rice CookerGX
Classes  >  loader  >  DownloadFile(string,string)
loader class : DownloadFile(string,string) method

Description

Downloads the resource with the specified URL to a local file.

Syntax

loaderInstance.DownloadFile(string targetUrl, string fileName)

Arguments

ClassNameDescription
stringtargetUrlURL of a resource that want to download.
stringfileNamePath of a file that will be saved.

Return value

None

Sample code

//anyLoader is a instance of loader type.

string targetUrl = "ftp://localhost/anyfile.txt";

string fileName = "c:\anydirectory\anyfile.txt";

anyLoader.DownloadFile(targetUrl,fileName);

Notes

It's a wrapper of the System.Net.WebClient.DownloadFile(String,String).

Links for reference

Copyright © Rice All rights reserved.