transmit | R Documentation |
Utility function that supports easy file matching and download from a remote FTP server. Also enables on-the-fly file renaming and compression.
transmit(
remoteDir,
localDir = getwd(),
pattern = NULL,
rename = NULL,
compress = FALSE,
download = TRUE
)
remoteDir |
|
localDir |
|
pattern |
|
rename |
|
compress |
|
download |
|
Invisible character
.
Local file paths.
Updated 2023-09-19.
remoteDir <- "ftp://ftp.ncbi.nlm.nih.gov/genomes/"
if (goalie::isAnExistingUrl(remoteDir)) {
localDir <- AcidBase::tempdir2()
readme <- transmit(
remoteDir = remoteDir,
localDir = localDir,
pattern = "^README\\.txt$",
rename = "ncbi-readme.txt",
compress = FALSE
)
basename(readme)
file.exists(readme)
AcidBase::unlink2(localDir)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.