Get remote URL directory listing

getURLDirList(url, pattern = NULL)

Arguments

url

character(1). Uniform Resource Locator (URL).

pattern

character(1). Pattern to use for matching.

Value

character. Simple directory contents return, including both files and subdirectories.

Note

Best served using FTP instead of HTTP.

Updated 2020-01-18.

Examples

if ( goalie::hasInternet() && !isTRUE(nzchar(Sys.getenv("CI"))) ) { url <- "ftp://ftp.ncbi.nlm.nih.gov/genomes/Homo_sapiens/current" x <- getURLDirList(url) tail(x) }
#> [1] "GCF_000001405.39_GRCh38.p13" #> [2] "Homo_sapiens_AR109.20190905_annotation_report.xml" #> [3] "README_Homo_sapiens_annotation_release_109.20190905"