Rheo.Storage 0.1.2-beta.1

This is a prerelease version of Rheo.Storage.
dotnet add package Rheo.Storage --version 0.1.2-beta.1
                    
NuGet\Install-Package Rheo.Storage -Version 0.1.2-beta.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="Rheo.Storage" Version="0.1.2-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rheo.Storage" Version="0.1.2-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="Rheo.Storage" />
                    
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 Rheo.Storage --version 0.1.2-beta.1
                    
#r "nuget: Rheo.Storage, 0.1.2-beta.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.
#:package Rheo.Storage@0.1.2-beta.1
                    
#: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=Rheo.Storage&version=0.1.2-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Rheo.Storage&version=0.1.2-beta.1&prerelease
                    
Install as a Cake Tool

Rheo.Storage

Rheo.Storage is a modern, high-performance .NET 9 library for managing files and directories with rich metadata, asynchronous operations, and progress reporting. It provides a flexible abstraction for storage entities, supporting advanced scenarios such as concurrent file operations, custom storage information, and robust error handling.

Features

  • Abstract base class for storage entities (StorageController<T>)
  • File management via FileController (copy, move, rename, delete)
  • Rich metadata support (size, content type, display name, etc.)
  • Asynchronous operations with cancellation and progress reporting
  • Buffer size optimization for large file transfers
  • Unit of measurement (UOM) support for storage size
  • Extensible storage information via StorageInfomation and FileInfomation
  • Utility helpers for storage paths (StoragePaths)
  • .NET 9 and C# 13 support

Getting Started

Installation

Add a reference to the Rheo.Storage project or install via NuGet (if available):

Usage Example

using Rheo.Storage;

// Create a file controller for an existing file
var fileController = new FileController("example.txt");

// Get file metadata
Console.WriteLine($"Created: {fileController.CreatedAt}"); 
Console.WriteLine($"Extension: {fileController.Extension}"); 
Console.WriteLine($"Size: {fileController.GetSizeString()}");

// Copy file asynchronously with progress reporting 
await fileController.CopyAsync(
	destination: "backup/", 
	overwrite: true, 
	progress: new Progress<StorageProgress>(p => {
		Console.WriteLine($"Copied {p.BytesTransferred} of {p.TotalBytes} bytes ({p.ProgressPercentage:F2}%)");
	})
);

API Overview

StorageController<T>
  • Abstract base for storage management
  • Properties: Name, ParentDirectory, FullPath, CreatedAt, IsAvailable, SizeInBytes
  • Methods: CopyAsync, MoveAsync, DeleteAsync, RenameAsync, GetSize, GetSizeString
FileController
  • Inherits from StorageController<FileInfomation>
  • File-specific operations and metadata
StorageProgress
  • Progress reporting for async operations
  • Properties: TotalBytes, BytesTransferred, BytesPerSecond, ProgressPercentage
StoragePaths
  • Helpers for assembly root, local app data, and executable paths

Testing

Unit tests are provided in the Rheo.Test project using xUnit and Moq. To run tests:

Requirements

  • .NET 9.0 or later
  • C# 13.0

Contributing

Contributions are welcome! Please submit issues or pull requests via GitHub.

License

This project is licensed under the MIT License.

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

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
0.1.2-beta.1 115 10/16/2025