# `Redist.File`
[🔗](https://github.com/harmont-dev/hyper/blob/main/lib/redist/file.ex#L1)

Fetches a single raw file from a URL, verifies its SHA-256, and installs it at
a destination path. The raw-file analogue of `Redist.Targz` (used for
assets that ship as plain files rather than tarballs, e.g. vmlinux images).

# `install`

```elixir
@spec install(String.t(), String.t(), Path.t()) ::
  :ok
  | {:error,
     {:download_failed, non_neg_integer()}
     | {:download_error, term()}
     | {:checksum_mismatch, String.t(), String.t()}
     | {:install_failed, term()}}
```

Download `url`, verify its SHA-256 equals `sha256` (lowercase hex), and install
the file at `dest_path` (creating parent directories). The download lands in a
temp dir first, so a failed verify never leaves a partial file at `dest_path`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
