easycore.common.network¶
-
easycore.common.network.
download_file
(url: str, dir: str, filename: Optional[str] = None, progress: bool = True) → str[source]¶ Download a file from a given URL to a directory. If the file exists, will not overwrite the existing file.
Parameters: Returns: str – the path to the downloaded file or the existing one.