title: List names of files in FTP directory and its subdirectories
body: <p>I have been searched in the net and I didn't found any result. Actually I want to get the name of all the files that I have in the <code>root</code> and <code>Directory</code> and <code>Sub Directory</code>. I tried the code as bellow but its give me only the files in the <code>root</code> of my FTP.</p>
  
  <p>The folder that I have in the FTP is like as bellow:</p>
  
  <pre class="lang-none prettyprint-override"><code>/ds/product/Jan/
  /ds/subproduct/Jan/
  /ds/category/Jan/
  </code></pre>
  
  <p>The code that I tried:</p>
  
  <pre><code>FtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.Create("ftp://" + FtpIP);
  ftpRequest.Credentials = new NetworkCredential(FtpUser, FtpPass);
  ftpRequest.Method = WebRequestMethods.Ftp.ListDirectory;
  FtpWebResponse response = (FtpWebResponse)ftpRequest.GetResponse();
  StreamReader streamReader = new StreamReader(response.GetResponseStream());
  
  List&lt;string&gt; directories = new List&lt;string&gt;();
  
  string line = streamReader.ReadLine();
  while (!string.IsNullOrEmpty(line))
  {
     // directories.Add(line);
      line = streamReader.ReadLine().ToString();
      MessageBox.Show(line);
  }
  
  streamReader.Close();
  </code></pre>