[−][src]Function librarian::download_or_find_file
pub fn download_or_find_file(
url: &str,
out_dir: Option<&Path>
) -> Result<PathBuf, DownloadError>
Download file if it doesn't already exist, and return the file's location.
You can use out_dir
to specify the download directory, otherwise the build script output directory will be used.
Example:
librarian::download_or_find_file("https://example.com/file.zip", None)?;