title: Recursive list.files for FTP-Server
body: <p>is there a ftp-version of <code>list.files(path, recursive=TRUE)</code>?</p>
  
  <p>I want to get all the URL's of the ZIP-Archieves in subdirectories on this FTP-Server</p>
  
  <pre><code>url &lt;- "ftp://ftp-cdc.dwd.de/pub/CDC/observations_germany/climate/hourly/"
  </code></pre>
  
  <p>so i want to get a list of all files in this directory:<br>
  <a href="ftp://ftp-cdc.dwd.de/pub/CDC/observations_germany/climate/hourly/wind/recent/">ftp://ftp-cdc.dwd.de/pub/CDC/observations_germany/climate/hourly/wind/recent/</a>
  as well as<br>
  <a href="ftp://ftp-cdc.dwd.de/pub/CDC/observations_germany/climate/hourly/air_temperature/historical/">ftp://ftp-cdc.dwd.de/pub/CDC/observations_germany/climate/hourly/air_temperature/historical/</a>
  and so on</p>
  
  <p>With <code>RCurl</code> i managed to download the dirlist of this directory but to not to get a comprehensive list of all zip-archieves in all subdirectories. 
  Any advice other than looping trough the directories and getting the dirlists one by one?</p>
  
  <p>RCurl code so far:</p>
  
  <pre><code>dwd_dirlist &lt;- function(url, full = TRUE){
    dir &lt;- unlist(
      strsplit(
        getURL(url,
               ftp.use.epsv = FALSE,
               dirlistonly = TRUE),
        "\n")
      )
    if(full) dir &lt;- paste0(url, dir)
    return(dir)
  }
  </code></pre>