Dhara.Storage 0.10.1

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

Dhara.Storage

NuGet License: Apache-2.0

.NET API for file and directory handles, content-based analysis, I/O with progress and cancellation, and directory watching—usable from ordinary libraries and desktop apps on Windows, Linux, and macOS.

The package bundles a small native dhara-sd sidecar for supported runtimes and talks to it over a local gRPC connection, so storage and analysis run at native speed alongside your .NET process. You work in C#; you do not need to write Rust, and the sidecar starts automatically on first use.

Why use it

  • DharaStorage.File / DharaStorage.Directory for path-based work
  • Content-based MIME and type candidates (Analyze / AnalyzePath); Metadata enriched from the handle cache
  • Sync and async read, write, copy, move, rename, delete
  • Process-first copy/move (StorageProcess) with IProgress<StorageProcessEvent>
  • Directory watching with typed change events
  • One NuGet with a bundled dhara-sd sidecar for supported RIDs
  • Native AOT–compatible: publish your app with <PublishAot>true</PublishAot>; the sidecar is deployed alongside your executable via NuGet native assets

Prerequisites

  • .NET SDK 10.0.x
  • A supported runtime identifier at execution time (see below)

Install

dotnet add package Dhara.Storage --version 0.10.1
OS RIDs Runtime status
Windows win-x64, win-arm64 Named pipe + handle-dup
Linux linux-x64, linux-arm64 UDS + SCM_RIGHTS FD pass
macOS osx-arm64 UDS + SCM_RIGHTS FD pass

Usage

1. Open a file, analyze, and read

using Dhara.Storage;

var file = DharaStorage.File(@"C:\data\sample.pdf");
var report = file.Analyze();
var metadata = file.Metadata; // enriched from the cached analysis
var bytes = await file.ReadBytesAsync();

2. Watch a directory

using Dhara.Storage;

var directory = DharaStorage.Directory(@"C:\data");
directory.StartWatching();
directory.Changed += (_, change) => Console.WriteLine(change.Path);

3. Copy (process-first)

using Dhara.Storage;
using Dhara.Storage.Models.Progress;

var file = DharaStorage.File(@"C:\data\input.bin");
var progress = new Progress<StorageProcessEvent>(e =>
{
    if (e is StorageProcessBytes bytes)
        Console.WriteLine($"{bytes.BytesTransferred} bytes");
});

// Sync: starts immediately and waits inside.
file.Copy(@"C:\data\copy.bin", progress, overwrite: true);

// Async: starts immediately; await StorageProcess for the destination path.
var destination = await file.CopyAsync(@"C:\data\copy2.bin", progress, overwrite: true);

4. Host lifetime (ASP.NET Core, worker services)

Add Dhara.Storage.Extensions.Hosting to start and stop the sidecar with your application's IHost:

builder.Services.AddDharaStorage();

Shell icons are available over the sidecar when requested (includeIcon). File type labels come from content analysis when requested.

License

Apache-2.0.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on Dhara.Storage:

Package Downloads
Dhara.Storage.Extensions.Hosting

Generic Host integration that starts and stops the Dhara Storage sidecar daemon with the application lifetime.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.10.1 108 8/23/2026
0.9.23 145 8/8/2026
0.9.6 126 7/26/2026
0.8.0 143 6/30/2026
0.7.1 137 6/29/2026
0.6.0 134 6/22/2026
0.4.4 123 5/14/2026