DownloadRequest constructor
A download a plugin asks for: one https file or zip, verified, placed under the plugin’s own data folder (IPluginDownloads.DataFolder — the same folder IPluginDataStore uses).
public DownloadRequest(Uri Url, string Sha256, long MaxBytes, string TargetPath, bool ExtractZip, IReadOnlyList<string>? IncludePrefixes = null)| parameter | description |
|---|---|
| Url | Absolute https URL. Anything else is refused. |
| Sha256 | The expected SHA-256 of the downloaded bytes: 64 hex characters, compared case-insensitively. Checked before anything is written; a mismatch writes nothing. |
| MaxBytes | Upper bound on the downloaded (for a zip: compressed) bytes. The whole download is held in memory until it is verified, so keep this to what you actually need. |
| TargetPath | Relative to the plugin’s data folder, “/”-separated, and never escaping it. For a plain download it is the destination FILE path (e.g. "reshade/ReShade64.dll"); for a zip it is the destination FOLDER. A zip download REPLACES that whole folder (atomically), so keep any other files of yours elsewhere. |
| ExtractZip | True: the download is a zip, extracted into TargetPath. False: the bytes are written as one file at TargetPath. |
| IncludePrefixes | Zip only: extract only entries whose path starts with one of these prefixes (null = every entry). The prefix is KEPT in the output path: with ["Shaders/"] and target "packs/std", the entry Shaders/Bloom.fx lands at packs/std/Shaders/Bloom.fx; Textures/x.png is skipped. |
See Also
Section titled “See Also”- record DownloadRequest
- namespace Stellar.Abstractions.Domain