check_download_file(filename, remotepath, download_dir, remotename=None, replace=False)¶
Deprecated since version 1.1: The check_download_file function is deprecated and may be removed in version 2.1.
Downloads a file from a remotepath to a localpath if it isn’t there.
This function checks whether a file with name
filenameexists in the user’s local machine. If it doesn’t, it downloads the file from
str) – Name of file.
str) – URL of the remote location from which filename can be downloaded.
str) – The files directory.
str, optional) – Filename under which the file is stored remotely. Default is same as filename.
>>> from sunpy.util.net import check_download_file >>> remotepath = "https://www.download_repository.com/downloads/" >>> check_download_file("filename.txt", remotepath, download_dir='.')