Util.File.Abstraction 6.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Util.File.Abstraction --version 6.0.0
NuGet\Install-Package Util.File.Abstraction -Version 6.0.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="Util.File.Abstraction" Version="6.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Util.File.Abstraction --version 6.0.0
#r "nuget: Util.File.Abstraction, 6.0.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.
// Install Util.File.Abstraction as a Cake Addin
#addin nuget:?package=Util.File.Abstraction&version=6.0.0

// Install Util.File.Abstraction as a Cake Tool
#tool nuget:?package=Util.File.Abstraction&version=6.0.0

This is an easy way of writing/reading files. This might be useful for state management, or quick prototyping.

For example, you can save files to the current directory with the syntax: someObject.ToFile();

For example: 256.ToFile(); This will write the number 256 to a file.

Then, you can display the file with FileAbstraction.DisplayFile(); (It will figure out how to find the file automatically)

You can also specify specific paths, but the FileAbstraction library will try to find your file based on the name, even if it is not found. For example:

"This was found in my user folder".ToFile( Path.Combine(@"C:","Users",$"{ Environment.UserName}", "Downloads", "myFile.txt")); FileAbstraction.DisplayFile("myFile.txt");

You can get creative, and serialise objects to/from files, for example:

var c = new Computer(); c.ToFile(); var savedC = FileAbstraction.ReadBinFile<Computer>(); Console.WriteLine(savedC.Name);

I would love to get feedback, or review any pull requests.

Divan van Zyl 2023

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.

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
6.0.5 274 1/16/2023
6.0.4 265 1/15/2023
6.0.3 279 1/14/2023
6.0.2 280 1/14/2023
6.0.1 254 1/9/2023
6.0.0 263 1/8/2023