Class Downloads
- Namespace
- Fabricator.Resources
- Assembly
- Fabricator.Resources.dll
[CompilationMapping(SourceConstructFlags.ObjectType)]
public class Downloads
- Inheritance
-
Downloads
- Inherited Members
Methods
downloadFile(Uri, Sha256Hash, AbsolutePath, FSharpOption<IEnumerable<Resource>>?, FSharpOption<TimeSpan>?)
Creates a resource downloading a file and verifying its hash.
public static Resource downloadFile(Uri uri, Hash.Sha256Hash expectedHash, AbsolutePath downloadPath, FSharpOption<IEnumerable<Resource>>? dependsOn, FSharpOption<TimeSpan>? readTimeout)
Parameters
uriUriThe URI to download the file from.
expectedHashHash.Sha256HashThe expected SHA-256 hash of the file.
downloadPathAbsolutePathThe path to save the file to.
dependsOnFSharpOption<IEnumerable<Resource>>The resources this resource depends on.
readTimeoutFSharpOption<TimeSpan>The maximum time to wait for the next portion of the file data, after which the download fails. 100 seconds by default.