candle.helper_utils.fetch_file#
- candle.helper_utils.fetch_file(link, subdir, unpack=False, md5_hash=None)#
Convert URL to file path and download the file if it is not already present in spedified cache.
- Parameters:
link (string) – URL of the file to download
subdir (string) – Local path to check for cached file.
unpack (bool) – Flag to specify if the file to download should be decompressed too. (default: False, no decompression)
md5_hash (string) – MD5 hash used as a checksum to verify data integrity. Verification is carried out if a hash is provided. (default: None, no verification)
- Returns:
local path to the downloaded, or cached, file.
- Return type:
string