Created
          January 12, 2016 15:16 
        
      - 
      
 - 
        
Save anarosner/4e81f6ad9f1ccc7699c8 to your computer and use it in GitHub Desktop.  
    List file contents of an ftp directory
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | list_ftp_contents <- function( url, sep="[\r\n]", fixed=FALSE ) { | |
| require(RCurl) | |
| # require(reshape2) | |
| x <- getURL( url, ftp.use.epsv = FALSE, dirlistonly = TRUE ) | |
| y <- unlist( strsplit( x, sep, fixed=fixed ) ) | |
| z <- y[ y!="" ] | |
| return(z) | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment