safe_download: Safe Download Downloads a file and tries hard to tidy up in...

View source: R/util.R

safe_downloadR Documentation

Safe Download Downloads a file and tries hard to tidy up in the event of errors. Since these files are typically large we don't want to leave them in temp directories. The destfile should only appear if the download was successful.

Description

Safe Download

Downloads a file and tries hard to tidy up in the event of errors. Since these files are typically large we don't want to leave them in temp directories.

The destfile should only appear if the download was successful.

Usage

safe_download(url, destfile, fvalidate)

Arguments

url

src for the download

destfile

destination filename

fvalidate

a fn that is passed the filename after download to validate it in some way. The fn should return TRUE if the file is valid.


HFAnalyticsLab/monstR documentation built on Sept. 13, 2022, 2:19 a.m.