Function phetch::gopher::download_url

source ·
pub fn download_url(
    url: &str,
    tls: bool,
    tor: bool,
    chan: KeyReceiver
) -> Result<(String, usize)>
Expand description

Downloads a binary to disk. Allows canceling with Ctrl-c, but it’s kind of hacky - needs the UI receiver passed in. Returns a tuple of: (path it was saved to, the size in bytes)