EasyTextFile 1.0.1

dotnet add package EasyTextFile --version 1.0.1                
NuGet\Install-Package EasyTextFile -Version 1.0.1                
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="EasyTextFile" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasyTextFile --version 1.0.1                
#r "nuget: EasyTextFile, 1.0.1"                
#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 EasyTextFile as a Cake Addin
#addin nuget:?package=EasyTextFile&version=1.0.1

// Install EasyTextFile as a Cake Tool
#tool nuget:?package=EasyTextFile&version=1.0.1                

This library allows easy text file handling.

Example of use:


// Saving to hello.txt using a single string content.
"Hello, World!\nGood morning.".SaveToFile("hello.txt");

// Saving to vici.txt using a string array as content.
new [] {
	"I see.",
	"I come.",
	"I conquer."
}.SaveToFile("vici.txt");

// Load content to an array of string.
string[] text = "vici.txt".LoadFile();

// Load content from an embedded resource text file.
// Only use the resource file name, without the namespace.
string[] lines = "news.txt".LoadFromEmbeddedResource();

// Joining array of string into one string.
var oneLiner = new[] {
	"Easy come",
	"Easy go"
}.ToText(); // == "Easy come\nEasy go"

// Splitting a string to array, by cartridge return.
var lines = "You jump,\nI jump.".ToLines(); // will be split to an array of 2 strings.

New in version 1.0.1


// FileInfo extension
var fileInfo = new FileInfo("c:\\temp\\hello.txt");
var content = fileInfo.ReadContent();

Upcoming in version 1.0.2 : reading/writing to CSV files.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
1.0.1 1,219 4/5/2018
1.0.0 1,018 3/31/2018

Added extension for FileInfo class.