Home

Egon Dürr

Introduction

Library is made for fast and easy use. Basic features are: download, upload, resume down/upload, events e.g. to show download in progressbar. Library is tested on Microsoft and Unix ftp-servers. Upload method creates automatic necessary directories.
This is the first project I publish, if you have questions, bugs, feature request, contact me: egon.duerr@gmx.at

Requirements

Visual Studio 2010
.NET 2 and higher

Examples

Complete documentation with demo projects is included in the download file

/////////////////////////////////////////////////////////////////////////////
// DOWNLOAD EXAMPLE
/////////////////////////////////////////////////////////////////////////////

FtpClient ftpClient = new FtpClient();
ftpClient.DownloadProgressChanged += new EventHandler<DownloadProgressChangedLibArgs>(ftpClient_DownloadProgressChanged);
ftpClient.DownloadFileCompleted += new EventHandler<DownloadFileCompletedEventLibArgs>(ftpClient_DownloadFileCompleted);
ftpClient.Host = "myFtpServer";
ftpClient.UserName = "myUserName";
ftpClient.Password = "myPassword";
ftpClient.Port = 21;
ftpClient.DownloadAsync("localDir", "localFilename", "remoteDir", "remoteFilename");

/////////////////////////////////////////////////////////////////////////////
// RESUME DOWNLOAD EXAMPLE
/////////////////////////////////////////////////////////////////////////////

FtpClient ftpClient = new FtpClient();
ftpClient.DownloadProgressChanged += new EventHandler<DownloadProgressChangedLibArgs>(ftpClient_DownloadProgressChanged);
ftpClient.DownloadFileCompleted += new EventHandler<DownloadFileCompletedEventLibArgs>(ftpClient_DownloadFileCompleted);
ftpClient.Host = "myFtpServer";
ftpClient.UserName = "myUserName";
ftpClient.Password = "myPassword";
ftpClient.Port = 21;
ftpClient..DownloadResumeAsync("localDir", "localFilename", "remoteDir", "remoteFilename");

/////////////////////////////////////////////////////////////////////////////
// UPLOAD EXAMPLE
/////////////////////////////////////////////////////////////////////////////

FtpClient ftpClient = new FtpClient();
ftpClient.UploadProgressChanged += new EventHandler<UploadProgressChangedLibArgs>(ftpClient_UploadProgressChanged);
ftpClient.UploadFileCompleted += new EventHandler<UploadFileCompletedEventLibArgs>(ftpClient_UploadFileCompleted);
ftpClient.Host = "myFtpServer";
ftpClient.UserName = "myUserName";
ftpClient.Password = "myPassword";
ftpClient.Port = 21;
ftpClient.UploadAsync("localDir", "localFilename", "remoteDir", "remoteFilename");

/////////////////////////////////////////////////////////////////////////////
// RESUME UPLOAD EXAMPLE
/////////////////////////////////////////////////////////////////////////////

FtpClient ftpClient = new FtpClient();
ftpClient.UploadProgressChanged += new EventHandler<UploadProgressChangedLibArgs>(ftpClient_UploadProgressChanged);
ftpClient.UploadFileCompleted += new EventHandler<UploadFileCompletedEventLibArgs>(ftpClient_UploadFileCompleted);
ftpClient.Host = "myFtpServer";
ftpClient.UserName = "myUserName";
ftpClient.Password = "myPassword";
ftpClient.Port = 21;
ftpClient.UploadResumeAsync("localDir", "localFilename", "remoteDir", "remoteFilename");

Classes

Complete documentation with demo projects is included in the download file

++++++++++++++++++++++++++++++++++++++++++
class FtpClient
++++++++++++++++++++++++++++++++++++++++++

Methods:
Upload,
UploadAsync,
UploadResume,
UploadResumeAsync,
Download,
DownloadAsync,
DownloadResume,
DownloadResumeAsync,
FileExists,
DirectoryExits,
GetFileSize,
CreateDirectory,
CreateDirectoryRecursive,
Abort

Properties:
UserName,
Password,
Port,
Host,
UsePassive,
TimeOut,
KeepAlive

Events:
UploadProgressChanged,
UploadFileCompleted,
DownloadProgressChanged,
DownloadFileCompleted


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks