Conesoft.Files 4.3.0

dotnet add package Conesoft.Files --version 4.3.0
                    
NuGet\Install-Package Conesoft.Files -Version 4.3.0
                    
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="4.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Conesoft.Files" Version="4.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Conesoft.Files" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Conesoft.Files --version 4.3.0
                    
#r "nuget: Conesoft.Files, 4.3.0"
                    
#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.
#:package Conesoft.Files@4.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Conesoft.Files&version=4.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Conesoft.Files&version=4.3.0
                    
Install as a Cake Tool

Conesoft.Files

publish to nuget

NuGet version (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 Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.3.0 200 4/20/2025
4.2.3 202 3/20/2025
4.2.2 172 3/20/2025
4.2.1 175 3/16/2025
4.2.0 165 3/16/2025
4.1.5 219 3/9/2025
4.1.4 139 2/26/2025
4.1.3 136 2/26/2025
4.1.2 159 2/25/2025
4.1.1 141 2/21/2025
4.1.0 161 2/19/2025
4.0.7 124 2/12/2025
4.0.6 197 2/5/2025
4.0.5 137 2/5/2025
4.0.4 111 2/5/2025
4.0.3 145 2/4/2025
4.0.2 109 2/4/2025
4.0.1 115 2/4/2025
4.0.0 117 2/4/2025
3.1.1 110 2/3/2025
3.1.0 141 1/29/2025
3.0.10 119 1/26/2025
3.0.9 112 1/26/2025
3.0.8 113 1/20/2025
3.0.7 163 1/12/2025
3.0.6 97 1/12/2025
3.0.5 326 11/25/2024
3.0.4 102 11/25/2024
3.0.3 129 11/24/2024
3.0.2 109 11/23/2024
3.0.1 105 11/23/2024
3.0.0 165 11/23/2024
2.1.3 160 9/22/2024
2.1.2 110 9/22/2024
2.1.1 218 7/21/2024
2.1.0 121 7/21/2024
2.0.8 102 7/20/2024
2.0.7 116 7/20/2024
2.0.6 129 7/20/2024
2.0.5 123 7/20/2024
2.0.4 107 7/20/2024
2.0.3 111 7/20/2024
2.0.2 101 7/20/2024
2.0.1 117 7/20/2024
2.0.0 117 7/20/2024
1.9.8 120 7/19/2024
1.9.7 118 7/19/2024
1.9.6 226 6/17/2024
1.9.5 116 6/17/2024
1.9.4 133 6/16/2024
1.9.3 238 6/1/2024
1.9.2 141 5/26/2024
1.9.0 151 5/25/2024
1.8.5 146 5/25/2024
1.8.4 146 5/24/2024
1.8.3 131 5/23/2024
1.8.2 262 8/24/2023
1.8.1 253 7/31/2023
1.8.0 194 7/31/2023
1.7.9 188 7/31/2023
1.7.8 183 7/31/2023
1.7.7 253 7/18/2023
1.7.6 353 4/27/2023
1.7.5 196 4/27/2023
1.7.4 225 4/25/2023
1.7.3 375 1/11/2023
1.7.2 362 1/11/2023
1.7.1 332 12/29/2022
1.7.0 349 1/8/2022
1.6.4 1,012 7/27/2021
1.6.3 400 7/19/2021
1.6.2 405 7/19/2021
1.6.1 380 7/19/2021
1.6.0 381 7/19/2021
1.5.21 775 7/4/2021
1.5.20 419 7/4/2021
1.5.18 439 7/4/2021
1.5.17 424 7/4/2021
1.5.16 452 7/4/2021
1.5.15 661 6/23/2021
1.5.14 421 6/23/2021
1.5.13 426 6/23/2021
1.5.12 410 6/23/2021
1.5.11 454 6/23/2021
1.5.10 445 6/23/2021
1.5.9 1,623 6/22/2021
1.5.8 559 6/21/2021
1.5.7 466 6/21/2021
1.5.6 464 6/21/2021
1.5.5 416 6/9/2021
1.5.4 441 6/6/2021
1.5.3 684 5/26/2021
1.5.2 466 5/20/2021
1.5.1 438 5/20/2021
1.5.0 428 5/17/2021
1.4.10 462 5/16/2021
1.4.6 511 5/16/2021
1.4.5 513 5/16/2021
1.4.4 457 5/16/2021
1.4.3 452 5/16/2021
1.4.2 619 4/26/2021
1.4.1 422 4/26/2021
1.4.0 462 4/26/2021
1.3.2 795 4/11/2021
1.3.1 854 3/17/2021
1.3.0 407 3/17/2021
1.2.5 424 3/16/2021
1.2.4 415 3/16/2021
1.2.3 431 3/16/2021
1.2.2 429 3/16/2021
1.2.1 440 3/16/2021
1.2.0 479 1/4/2021
1.1.2 2,176 11/9/2020
1.1.1 546 11/9/2020
1.0.15 510 11/9/2020
1.0.14 530 11/9/2020
1.0.13 543 11/9/2020
1.0.12 701 10/9/2020
1.0.11 711 9/10/2020
1.0.10 1,012 9/8/2020
1.0.9 575 8/30/2020
1.0.8 568 8/5/2020
1.0.7 1,016 7/19/2020
1.0.6 584 7/19/2020
1.0.5 639 5/2/2020
1.0.4 621 5/2/2020
1.0.3 566 5/2/2020
1.0.2 548 5/2/2020
1.0.1 566 5/2/2020
1.0.0 771 5/2/2020