ArturoRoedell.Util.FileUtilitiesXT 1.0.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package ArturoRoedell.Util.FileUtilitiesXT --version 1.0.0
NuGet\Install-Package ArturoRoedell.Util.FileUtilitiesXT -Version 1.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="ArturoRoedell.Util.FileUtilitiesXT" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ArturoRoedell.Util.FileUtilitiesXT --version 1.0.0
#r "nuget: ArturoRoedell.Util.FileUtilitiesXT, 1.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 ArturoRoedell.Util.FileUtilitiesXT as a Cake Addin
#addin nuget:?package=ArturoRoedell.Util.FileUtilitiesXT&version=1.0.0

// Install ArturoRoedell.Util.FileUtilitiesXT as a Cake Tool
#tool nuget:?package=ArturoRoedell.Util.FileUtilitiesXT&version=1.0.0

Read write Json files and text files with ease

This is a small simple c# library to make to make working wih json files a bit easier to work with. Also reduces the lines of code to read and write custom files text csv etc.

'FastCreateWriteFile(filecontent)' which I could have named DefaultSavefileSystem as well, and all that is needed is to add the file Content Also FastReadFile() returns text that is saved in the default file. The default directory is relative and the filename is stored in code

Also for Json Files it is now simpler to serialize and save files with fewer lines of code using CustomJsonFile object, LoadFileToListThenSortAndCap method and the CreateFileSortWriteToJson method as seen in the demo file.

FileUtilitiesXT needs to be instantiated to use the methods like this FileUtilitiesXT fileUtilitiesXt = new FileUtilitiesXT();. The following is the current list of methods that can be used.

List of Methods:

LoadFileToListThenSortAndCap<T>(CustomJsonFile<T> myJsonFile, Func<T, IComparable> getProp, int capLimit = 500)

SortScore<T>(CustomJsonFile<T> myJsonFile,Func<T, IComparable> getProp )

CreateFileSortWriteToJson<T>(CustomJsonFile<T> myJsonFile, Func<T, IComparable> getProp, int capLimit = 500)

List<T> DeserializeJsonStringReturnList<T>(string fileContent)

string SerializeJsonDataReturnString<T>(List<T> listData)

string PromptForRelativeDirectory(string pathReplace = null, string repeatString = "Would You like to use this relative directory folder shown above?")

ErraseOverflow <T>(List<T> listData, int totalCap)

ConcatPathFileNameAndSuffix(string path, string name, string suffix)

CreateFile(string filePath, string name)

TestPathAndCreateFolder(string dirpath)

ReadFromFile(string filepath)

CheckIfFileExistsThenCreateIt(string filepath)

WriteToFile(string filePath, string jsonString)

AppendToFile(string filePath, string contents)

List<T> AppendToAndRetunList<T>(List<T> listDataOriginal, List<T> listDataToAppend)

string FastFilePath(String fileName = defaultfileName, string fileDirectory = " ")

FastCreateWriteFile(string fileContent, string filepath = " ")

string FastReadFile()

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.
  • net6.0

    • 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