Converting a relatively obscure GitHub Gist to a proper blog post.
There are still some sites that use FTP, not a more modern API or even just http(s). I’m looking at you BOM. Sometimes it’s useful to know what files are available on the server in you R session.
Using this code snippet you can easily get a list of files on the FTP server in your R session.
|
|
## Using libcurl 8.7.1 with LibreSSL/3.3.6
|
|
## [1] "Notification_of_file_removal.txt" "README"
## [3] "charts_data" "clim_data"
## [5] "difacs" "fwo"
## [7] "gms" "nmgu"
## [9] "nwp" "radar"
## [11] "radar_transparencies" "vaac"