Download file from URL

Description

Downloads a file from a URL with robust error handling, retry logic, and validation. Automatically creates necessary directories and validates downloaded content. Skips download if file already exists.

Usage

get_file(url, export, limit = 3600L)

Arguments

url character URL of the file to download
export character File path where the file should be saved
limit integer Timeout limit in seconds (default: 3600 = 1 hour)

Value

Path to the downloaded file (invisibly)

See Also

Other data-retrieval: get_compounds_xrefs(), get_example_files(), get_gnps_tables(), get_last_version_from_zenodo(), get_organism_taxonomy_ott()

Examples

library("tima")

get_file(
  url = "https://example.com/data.tsv",
  export = "data/source/data.tsv"
)