Starksoft FTP/FTPS Component for .NET and Mono

Free, opensource, easy to use .NET 2.0+ / Mono 2.x Component for connecting to FTP servers.

Download

Change Log

Issue Tracker

Browse Source Code

Documentation

License

  • Easy to use component.
  • Works with Microsoft .NET Framework 2.0, 3.0 and 3.5 and Mono 2.x (without recompiling)
  • 100% C# managed code using .NET sockets - no third party code or dependencies.
  • Support for asynchronous upload and download operations as well as many other asynchronous commands.
  • Supports active and passive transfer modes.
  • Set your own active port range.
  • Supports zlib data compression.
  • Supports FTP over SSL aka FTPS (SSL 2.0, SSL 3.0, and TLS 1.0)
  • Supports automated file CRC-32, SHA1, and MD5 hash checking to automatically compare files on server with XCRC, XSHA1, and XMD5 commands.
  • FXP support for server-to-server file transfers.
  • Retrieve file directory information as a standard DataSet object or an object collection for ease of use.
  • Extract symbolic link and permission information from UNIX directory listing formats.
  • Supports logging of transfer events into a Stream object of your choosing.
  • Test to see if a file exists on the server with the method Exists().
  • Retrieve recursive directory listing of files on the FTP server using the method GetDirListDeep().
  • Full stream support - upload and download files using any .NET Stream object.
  • File support – upload and download files from the file system with a single line of code.
  • Easily restart FTP transfer. Component will automatically figure out the restart byte position for you.
  • Throttle data transfers with MaxUploadSpeed and MaxDownloadSpeed properties to prevent bandwidth staturation.
  • Designed for server based backend solutions or front end client applications.
  • Connection through HTTP and SOCKS v4, 4a, and 5 proxy servers.
  • Supports common firewalls configurations.
  • Includes a UNIX and DOS format directory parser that extracts non-homogenous directory listing data from all popular FTP servers. Parses UNIX file attributes and symbolic links.
  • Create your own pluggable directory parser with your own code for archaic FTP directory listings by implementing the IFtpItemParser interface.
  • Filter directory and file listings using wildcards and regular expressions.
  • Optionally adjusts file listings modified date and time to the local time zone
  • Intercept all client and server communication activity using the built in Request and Response events.
  • Monitor file transfer progress using events.
  • Create and delete directories.
  • The Move() method allows for a one-step operation to move files from one directory to another on the same server via memory streams. This feature is especially useful when archiving data on the server after processing or downloading files.
  • Custom error handling objects with .NET application exceptions.
  • Binary and ASCII file transfers.
  • Supports STOU command which creates a unique file on the FTP server during file upload operations.
  • Call custom FTP server commands operations using the Quote() method.
  • Supports MDTM (last modified time) FTP server command and automatically adjusts date to time zone of local machine.
  • Supports SIZE FTP server command to retrieve the size of the file.
  • Implements RFC 959 and RFC 1579.
  • Detailed Visual Studio integrated help.
  • Set command and transfer timeout values.
  • Allows for adjusting the TCP buffer size.
Example:

   // create a new FtpClient object with the host and port number to use
   // (optionally create a secure SSL connection) 

   FtpClient ftp = new FtpClient("ftp.host.com", 21); 
  
   // specify a binary, passive connection with no zlib file compression 
   ftp.FileTransferType = TransferType.Binary;
   ftp.DataTransferMode = TransferMode.Passive; 

   // open a connection to the ftp server 
   ftp.Open("username", "password"); 

   // change to the 'files' directory on the ftp server 
   ftp.ChangeDirectory("files");

   // retrieve a listing of the files in the directory 'files'
   // as a collection of FtpItem objects
   FtpItemCollection col = ftp.GetDirList();

   // retrieve a file to disk
   // (optionally we could store it to any System.Stream object)

   ftp.GetFile("file.txt", @"c:\temp\file.text", FileAction.Create);

   // close connection to the ftp server 
   ftp.Close();