XenoAtom.UnixTools 1.0.0

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

// Install XenoAtom.UnixTools as a Cake Tool
#tool nuget:?package=XenoAtom.UnixTools&version=1.0.0                

XenoAtom.UnixTools ci NuGet

<img align="right" width="160px" height="160px" src="https://raw.githubusercontent.com/XenoAtom/XenoAtom.UnixTools/main/img/XenoAtom.UnixTools.png">

This project provides a set of Unix tools for .NET 8+.

Note: This project is still in early development and the API is subject to change.

✨ Features

  • CPIO Archive: Read and write CPIO archives (Only the newc format is supported)
  • UnixInMemoryFileSystem: A simple in-memory file system to manipulate files and directories
    • This in memory filesystem can be used to easily manipulate in and out CPIO archives
  • .NET 8.0+ compatible and NativeAOT ready

📖 Usage

Reading a CPIO archive:

var cpioReader = new CpioReader(File.OpenRead("archive.cpio"));
while (cpioReader.TryGetNextEntry(out var entry))
{
    Console.WriteLine($"Entry: {entry.Name} {entry.FileType} ({entry.Mode})");
})

Writing a CPIO archive with a UnixInMemoryFileSystem:

var stream = new MemoryStream();
var fs = new UnixInMemoryFileSystem();
fs.CreateDirectory("/dir1");
fs.CreateDirectory("/dir1/dir2");
fs.CreateFile("/dir1/file1.txt", "Hello World");
{
    using var writer = new CpioWriter(File.Create("archive.cpio"));
    fs.WriteTo(writer);
}

🪪 License

This software is released under the BSD-2-Clause license.

🤗 Author

Alexandre Mutel aka xoofx.

Product 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

    • 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.0 272 9/8/2024