Soenneker.Utils.File.Download
2.1.11
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Soenneker.Utils.File.Download --version 2.1.11
NuGet\Install-Package Soenneker.Utils.File.Download -Version 2.1.11
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Utils.File.Download" Version="2.1.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soenneker.Utils.File.Download --version 2.1.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Utils.File.Download, 2.1.11"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Soenneker.Utils.File.Download as a Cake Addin #addin nuget:?package=Soenneker.Utils.File.Download&version=2.1.11 // Install Soenneker.Utils.File.Download as a Cake Tool #tool nuget:?package=Soenneker.Utils.File.Download&version=2.1.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Soenneker.Utils.File.Download
Provides a flexible utility for downloading files from specified URIs, with thread-safe concurrency and automatic file name conflict handling
Installation
dotnet add package Soenneker.Utils.File.Download
Usage
- Register
IFileDownloadUtil
within DI (Program.cs
).
public static async Task Main(string[] args)
{
...
builder.Services.AddFileDownloadUtilAsScoped();
}
- Inject
IFileDownloadUtil
Example:
public class TestClass
{
private readonly IFileDownloadUtil _util;
public TestClass(IFileDownloadUtil util)
{
_util = util;
}
public async ValueTask Download()
{
string directory = "path/to/save/files";
List<string> uris = new List<string>
{
"https://example.com/file1.jpg",
"https://example.com/file2.jpg",
"https://example.com/file3.jpg"
};
int maxConcurrentDownloads = 3;
List<string> downloadedFiles = await _util.DownloadFiles(directory, uris, maxConcurrentDownloads);
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Soenneker.Utils.File (>= 2.1.1201)
- Soenneker.Utils.HttpClientCache (>= 2.1.936)
- Soenneker.Utils.Path (>= 2.1.661)
- System.Threading.RateLimiting (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.1.40 | 33 | 11/6/2024 |
2.1.39 | 31 | 11/6/2024 |
2.1.38 | 32 | 11/6/2024 |
2.1.37 | 30 | 11/6/2024 |
2.1.36 | 39 | 11/5/2024 |
2.1.35 | 67 | 11/1/2024 |
2.1.34 | 63 | 11/1/2024 |
2.1.33 | 60 | 11/1/2024 |
2.1.32 | 55 | 11/1/2024 |
2.1.31 | 59 | 11/1/2024 |
2.1.30 | 62 | 11/1/2024 |
2.1.29 | 56 | 11/1/2024 |
2.1.28 | 60 | 11/1/2024 |
2.1.27 | 61 | 11/1/2024 |
2.1.26 | 57 | 11/1/2024 |
2.1.25 | 58 | 11/1/2024 |
2.1.24 | 70 | 10/29/2024 |
2.1.23 | 64 | 10/29/2024 |
2.1.22 | 64 | 10/29/2024 |
2.1.21 | 63 | 10/29/2024 |
2.1.20 | 65 | 10/29/2024 |
2.1.18 | 70 | 10/29/2024 |
2.1.17 | 64 | 10/29/2024 |
2.1.16 | 65 | 10/29/2024 |
2.1.15 | 64 | 10/29/2024 |
2.1.14 | 67 | 10/29/2024 |
2.1.13 | 65 | 10/29/2024 |
2.1.12 | 64 | 10/29/2024 |
2.1.11 | 65 | 10/29/2024 |
2.1.10 | 65 | 10/29/2024 |
2.1.9 | 61 | 10/29/2024 |
2.1.8 | 59 | 10/29/2024 |
2.1.7 | 68 | 10/28/2024 |
2.1.6 | 64 | 10/28/2024 |
2.1.5 | 63 | 10/28/2024 |
2.1.4 | 76 | 10/27/2024 |
2.1.3 | 69 | 10/27/2024 |
2.1.2 | 66 | 10/27/2024 |
2.1.1 | 63 | 10/26/2024 |