CauldronGPU.Setup.Fetch (CauldronGPU v0.3.3)

Copy Markdown View Source

Downloads for CauldronGPU.Setup: an archive fetched over HTTPS, with the server's certificate checked against the operating system's certificate store, and unpacked into a folder.

:ok = Fetch.unpack("https://example.com/thing.zip", :zip, "/tmp/thing")

Summary

Functions

The body of url, following redirects.

Downloads url and unpacks it, a :zip or :tar_gz archive, into dir, replacing what dir held.

Functions

download(url)

@spec download(String.t()) :: {:ok, binary()} | {:error, String.t()}

The body of url, following redirects.

unpack(url, kind, dir)

@spec unpack(String.t(), :zip | :tar_gz, Path.t()) :: :ok | {:error, String.t()}

Downloads url and unpacks it, a :zip or :tar_gz archive, into dir, replacing what dir held.