title: Download files using FluentFTP
body: <p>I am trying to implement FTP transfer using FluentFTP in C#. Getting a directory listing is very easy, but I am stuck on downloading files.</p>
  
  <p>I found one article that has an example in its comments here but it won't compile because I cannot find where the class FtpFile comes from.</p>
  
  <p>Does anybody have an example of how tocan I download a file from an ftp server using FluentFTP ?</p>
  
  <p><strong>EDIT:</strong> I found some examples here <a href="https://github.com/hgupta9/FluentFTP" rel="noreferrer">https://github.com/hgupta9/FluentFTP</a> But there is no example on how to actually download a file.</p>
  
  <p>In the this article Free FTP Library there is an example but it does not compile. This is the example</p>
  
  <pre><code>FtpClient ftp = new FtpClient(txtUsername.Text, txtPassword.Text, txtFTPAddress.Text);
  FtpListItem[] items = ftp.GetListing(); 
  FtpFile file = new FtpFile(ftp, "8051812.xml"); // THIS does not compile, class FtpFile is unknown
  file.Download("c:\\8051812.xml");
  file.Name = "8051814.xml";
  file.Download("c:\\8051814.xml");
  ftp.Disconnect();
  </code></pre>
  
  <p><strong>EDIT:</strong> The solution<br>
  The article I found contained an example that set me in the wrong direction.
  It seems there was once a Download method but that is gone long ago now.
  So the answer was to let that go and use the OpenRead() method to get a stream and than save that stream to a file.</p>