Conesoft.Files
1.9.6
dotnet add package Conesoft.Files --version 1.9.6
NuGet\Install-Package Conesoft.Files -Version 1.9.6
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="1.9.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Conesoft.Files --version 1.9.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Conesoft.Files, 1.9.6"
#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=1.9.6
// Install Conesoft.Files as a Cake Tool
#tool nuget:?package=Conesoft.Files&version=1.9.6
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 | 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
- Conesoft.Tools (>= 0.0.6)
NuGet packages (5)
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 |
---|---|---|
1.9.6 | 65 | 6/17/2024 |
1.9.5 | 63 | 6/17/2024 |
1.9.4 | 67 | 6/16/2024 |
1.9.3 | 137 | 6/1/2024 |
1.9.2 | 89 | 5/26/2024 |
1.9.0 | 104 | 5/25/2024 |
1.8.5 | 102 | 5/25/2024 |
1.8.4 | 91 | 5/24/2024 |
1.8.3 | 77 | 5/23/2024 |
1.8.2 | 188 | 8/24/2023 |
1.8.1 | 188 | 7/31/2023 |
1.8.0 | 142 | 7/31/2023 |
1.7.9 | 126 | 7/31/2023 |
1.7.8 | 133 | 7/31/2023 |
1.7.7 | 184 | 7/18/2023 |
1.7.6 | 257 | 4/27/2023 |
1.7.5 | 137 | 4/27/2023 |
1.7.4 | 151 | 4/25/2023 |
1.7.3 | 314 | 1/11/2023 |
1.7.2 | 297 | 1/11/2023 |
1.7.1 | 267 | 12/29/2022 |
1.7.0 | 262 | 1/8/2022 |
1.6.4 | 884 | 7/27/2021 |
1.6.3 | 318 | 7/19/2021 |
1.6.2 | 315 | 7/19/2021 |
1.6.1 | 312 | 7/19/2021 |
1.6.0 | 315 | 7/19/2021 |
1.5.21 | 669 | 7/4/2021 |
1.5.20 | 338 | 7/4/2021 |
1.5.18 | 357 | 7/4/2021 |
1.5.17 | 345 | 7/4/2021 |
1.5.16 | 372 | 7/4/2021 |
1.5.15 | 559 | 6/23/2021 |
1.5.14 | 328 | 6/23/2021 |
1.5.13 | 347 | 6/23/2021 |
1.5.12 | 341 | 6/23/2021 |
1.5.11 | 375 | 6/23/2021 |
1.5.10 | 365 | 6/23/2021 |
1.5.9 | 1,500 | 6/22/2021 |
1.5.8 | 449 | 6/21/2021 |
1.5.7 | 376 | 6/21/2021 |
1.5.6 | 343 | 6/21/2021 |
1.5.5 | 328 | 6/9/2021 |
1.5.4 | 344 | 6/6/2021 |
1.5.3 | 565 | 5/26/2021 |
1.5.2 | 377 | 5/20/2021 |
1.5.1 | 362 | 5/20/2021 |
1.5.0 | 338 | 5/17/2021 |
1.4.10 | 382 | 5/16/2021 |
1.4.6 | 416 | 5/16/2021 |
1.4.5 | 423 | 5/16/2021 |
1.4.4 | 387 | 5/16/2021 |
1.4.3 | 362 | 5/16/2021 |
1.4.2 | 518 | 4/26/2021 |
1.4.1 | 344 | 4/26/2021 |
1.4.0 | 364 | 4/26/2021 |
1.3.2 | 670 | 4/11/2021 |
1.3.1 | 731 | 3/17/2021 |
1.3.0 | 312 | 3/17/2021 |
1.2.5 | 323 | 3/16/2021 |
1.2.4 | 319 | 3/16/2021 |
1.2.3 | 338 | 3/16/2021 |
1.2.2 | 332 | 3/16/2021 |
1.2.1 | 347 | 3/16/2021 |
1.2.0 | 384 | 1/4/2021 |
1.1.2 | 2,011 | 11/9/2020 |
1.1.1 | 447 | 11/9/2020 |
1.0.15 | 428 | 11/9/2020 |
1.0.14 | 440 | 11/9/2020 |
1.0.13 | 447 | 11/9/2020 |
1.0.12 | 589 | 10/9/2020 |
1.0.11 | 601 | 9/10/2020 |
1.0.10 | 891 | 9/8/2020 |
1.0.9 | 480 | 8/30/2020 |
1.0.8 | 472 | 8/5/2020 |
1.0.7 | 901 | 7/19/2020 |
1.0.6 | 485 | 7/19/2020 |
1.0.5 | 531 | 5/2/2020 |
1.0.4 | 511 | 5/2/2020 |
1.0.3 | 461 | 5/2/2020 |
1.0.2 | 444 | 5/2/2020 |
1.0.1 | 463 | 5/2/2020 |
1.0.0 | 634 | 5/2/2020 |