This method downloads a file from an FTP server specifying the remote URI, and the local filename.

[Visual Basic] Public Function FtpDownloadFile(ByVal remoteAddress As System.Uri, ByVal localFileName As String) As Boolean
[C#] public bool FtpDownloadFile(System.Uri remoteAddress, string localFileName);

Parameters

remoteAddress
   The URI of the file to be downloaded

localFileName
   Local file name

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The FtpDownloadFile method downloads a file from an FTP server specifying the remote URI, and the local filename.

This method is effective for the FTP protocol.

Example

[Visual Basic.NET]
Dim Ret As Boolean
'Username and password 
ImageKit.File.FtpCredentials = New NetworkCredential("user", "password") 
'Enables passive mode connectivity
ImageKit.File.FtpPassive = True 
'Downloads the file
Ret = ImageKit.File.FtpDownloadFile(New Uri("ftp://www.newtone.co.jp/test/test.jpg"), "c:\test\test.jpg")

[Visual C#.NET] 
bool Ret; 
//Username and password 
ImageKit.File.FtpCredentials = new NetworkCredential("user", "password");
//Enables passive mode connectivity 
ImageKit.File.FtpPassive = true; 
//Downloads the file
Ret = ImageKit.File.FtpDownloadFile(new Uri("ftp://www.newtone.co.jp/test/test.jpg"), @"c:\test\test.jpg");

See Also

ImageKit.File Members | Newtone.ImageKit.Wpf.ImageKit

The ImageKit WPF is created by Newtone Corporation