Conesoft.Files
3.0.5
dotnet add package Conesoft.Files --version 3.0.5
NuGet\Install-Package Conesoft.Files -Version 3.0.5
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="Conesoft.Files" Version="3.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Conesoft.Files --version 3.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Conesoft.Files, 3.0.5"
#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 Conesoft.Files as a Cake Addin #addin nuget:?package=Conesoft.Files&version=3.0.5 // Install Conesoft.Files as a Cake Tool #tool nuget:?package=Conesoft.Files&version=3.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Conesoft.Files
https://www.nuget.org/packages/Conesoft.Files/
tiny example
adapted from realworld use
var logfile = Directory.From("SomeRoot") / "Scheduler" / Filename.From(DateTime.Today.ToShortDateString(), "md");
await logfile.AppendText($"- **{task.GetType().Name}** *executed* ");
instead of
var logPath = System.IO.Path.Combine("SomeRoot", "Scheduler", $"{DateTime.Today.ToShortDateString()}.md");
await System.IO.File.AppendAllTextAsync(logPath, $"- **{task.GetType().Name}** *executed* ");
reading/writing objects
var data = await File.From("some\path.json").ReadFromJson<SomeType>();
File.From("some\other path.json").WriteAsJson(data);
temporary directories
{
using var temp = Directory.Common.Temporary();
await (temp / Filename.From("some temporary", "tmp")).WriteBytes(somebytes);
// temporary directory gets deleted when out of scope
}
watching a folder
void PrettyPrint(string title, File[] files)
{
if(files.Length > 0)
{
Console.WriteLine($"{title} ({files.Length})");
foreach(var file in files)
{
Console.WriteLine(file);
}
Console.WriteLine();
}
}
await foreach(var files in Directory.From("some\path"))
{
PrettyPrint("ALL FILES", files.All);
PrettyPrint("ADDED FILES", files.Added);
PrettyPrint("CHANGED FILES", files.Changed);
PrettyPrint("DELETED FILES", files.Deleted);
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Conesoft.Tools (>= 2.0.0)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Conesoft.Files:
Package | Downloads |
---|---|
Conesoft.Users
little library allowing simple cookie based user authentication without a backing database |
|
Conesoft.Hosting
default settings for locally hosted aspnet pages |
|
Conesoft.DomainAreas
ASP.NET Core request Rewriter, allowing Areas to be accessed as domains |
|
Conesoft.LetsEncrypt
Letsencrypt Wildcard Generation using Dnsimple |
|
Conesoft.All
meta package for all major Conesoft Nuget libraries |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.0.5 | 258 | 11/25/2024 |
3.0.4 | 84 | 11/25/2024 |
3.0.3 | 103 | 11/24/2024 |
3.0.2 | 91 | 11/23/2024 |
3.0.1 | 85 | 11/23/2024 |
3.0.0 | 146 | 11/23/2024 |
2.1.3 | 138 | 9/22/2024 |
2.1.2 | 94 | 9/22/2024 |
2.1.1 | 207 | 7/21/2024 |
2.1.0 | 99 | 7/21/2024 |
2.0.8 | 92 | 7/20/2024 |
2.0.7 | 106 | 7/20/2024 |
2.0.6 | 109 | 7/20/2024 |
2.0.5 | 107 | 7/20/2024 |
2.0.4 | 88 | 7/20/2024 |
2.0.3 | 98 | 7/20/2024 |
2.0.2 | 89 | 7/20/2024 |
2.0.1 | 106 | 7/20/2024 |
2.0.0 | 106 | 7/20/2024 |
1.9.8 | 103 | 7/19/2024 |
1.9.7 | 105 | 7/19/2024 |
1.9.6 | 212 | 6/17/2024 |
1.9.5 | 103 | 6/17/2024 |
1.9.4 | 115 | 6/16/2024 |
1.9.3 | 222 | 6/1/2024 |
1.9.2 | 129 | 5/26/2024 |
1.9.0 | 139 | 5/25/2024 |
1.8.5 | 135 | 5/25/2024 |
1.8.4 | 136 | 5/24/2024 |
1.8.3 | 117 | 5/23/2024 |
1.8.2 | 231 | 8/24/2023 |
1.8.1 | 228 | 7/31/2023 |
1.8.0 | 172 | 7/31/2023 |
1.7.9 | 164 | 7/31/2023 |
1.7.8 | 160 | 7/31/2023 |
1.7.7 | 231 | 7/18/2023 |
1.7.6 | 322 | 4/27/2023 |
1.7.5 | 166 | 4/27/2023 |
1.7.4 | 180 | 4/25/2023 |
1.7.3 | 345 | 1/11/2023 |
1.7.2 | 329 | 1/11/2023 |
1.7.1 | 297 | 12/29/2022 |
1.7.0 | 299 | 1/8/2022 |
1.6.4 | 965 | 7/27/2021 |
1.6.3 | 353 | 7/19/2021 |
1.6.2 | 356 | 7/19/2021 |
1.6.1 | 333 | 7/19/2021 |
1.6.0 | 334 | 7/19/2021 |
1.5.21 | 729 | 7/4/2021 |
1.5.20 | 372 | 7/4/2021 |
1.5.18 | 389 | 7/4/2021 |
1.5.17 | 377 | 7/4/2021 |
1.5.16 | 405 | 7/4/2021 |
1.5.15 | 613 | 6/23/2021 |
1.5.14 | 367 | 6/23/2021 |
1.5.13 | 378 | 6/23/2021 |
1.5.12 | 360 | 6/23/2021 |
1.5.11 | 409 | 6/23/2021 |
1.5.10 | 396 | 6/23/2021 |
1.5.9 | 1,571 | 6/22/2021 |
1.5.8 | 499 | 6/21/2021 |
1.5.7 | 410 | 6/21/2021 |
1.5.6 | 406 | 6/21/2021 |
1.5.5 | 364 | 6/9/2021 |
1.5.4 | 377 | 6/6/2021 |
1.5.3 | 630 | 5/26/2021 |
1.5.2 | 412 | 5/20/2021 |
1.5.1 | 380 | 5/20/2021 |
1.5.0 | 370 | 5/17/2021 |
1.4.10 | 401 | 5/16/2021 |
1.4.6 | 455 | 5/16/2021 |
1.4.5 | 460 | 5/16/2021 |
1.4.4 | 406 | 5/16/2021 |
1.4.3 | 398 | 5/16/2021 |
1.4.2 | 563 | 4/26/2021 |
1.4.1 | 363 | 4/26/2021 |
1.4.0 | 399 | 4/26/2021 |
1.3.2 | 732 | 4/11/2021 |
1.3.1 | 791 | 3/17/2021 |
1.3.0 | 349 | 3/17/2021 |
1.2.5 | 360 | 3/16/2021 |
1.2.4 | 351 | 3/16/2021 |
1.2.3 | 373 | 3/16/2021 |
1.2.2 | 371 | 3/16/2021 |
1.2.1 | 382 | 3/16/2021 |
1.2.0 | 417 | 1/4/2021 |
1.1.2 | 2,104 | 11/9/2020 |
1.1.1 | 480 | 11/9/2020 |
1.0.15 | 446 | 11/9/2020 |
1.0.14 | 459 | 11/9/2020 |
1.0.13 | 479 | 11/9/2020 |
1.0.12 | 637 | 10/9/2020 |
1.0.11 | 645 | 9/10/2020 |
1.0.10 | 950 | 9/8/2020 |
1.0.9 | 511 | 8/30/2020 |
1.0.8 | 504 | 8/5/2020 |
1.0.7 | 950 | 7/19/2020 |
1.0.6 | 517 | 7/19/2020 |
1.0.5 | 565 | 5/2/2020 |
1.0.4 | 552 | 5/2/2020 |
1.0.3 | 494 | 5/2/2020 |
1.0.2 | 475 | 5/2/2020 |
1.0.1 | 493 | 5/2/2020 |
1.0.0 | 703 | 5/2/2020 |