Table of Contents

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

uri Uri

The URI to download the file from.

expectedHash Hash.Sha256Hash

The expected SHA-256 hash of the file.

downloadPath AbsolutePath

The path to save the file to.

dependsOn FSharpOption<IEnumerable<Resource>>

The resources this resource depends on.

readTimeout FSharpOption<TimeSpan>

The maximum time to wait for the next portion of the file data, after which the download fails. 100 seconds by default.

Returns

Resource