LibFuseSharp 1.0.0

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

LibFuseSharp

NuGet License: MIT .NET 8 | 9 | 10

A FUSE 3 high-level mount library for .NET on Linux (libfuse3) and macOS (macFUSE). Implement a read-only volume, mount it with one call, and probe the runtime before you mount.

Source: purelogiccode/LibFuseSharp. Used by SimpleXisoDrive and CHDMounter.

Requirements

  • Linux (x64 or ARM64) with libfuse3 (for example sudo apt install libfuse3-3 fuse3) and /dev/fuse available, or macOS (Intel or Apple silicon) with macFUSE installed.
  • .NET 8, 9 or 10 runtime.

Set the LIBFUSESHARP_LIBRARY environment variable to override the FUSE library path used for probing and loading (mainly useful for tests and custom installations).

Quick start

Implement IFuseVolume for your data source:

using FuseSharp;

public sealed class MyVolume : IFuseVolume
{
    public string VolumeLabel => "MyVolume";
    public DateTime VolumeCreationTime => DateTime.UtcNow;
    public ulong VolumeSize => 1024 * 1024;

    public IFuseEntry? GetEntry(string path) { /* look up "/file.txt", "/" ... */ }
    public IEnumerable<IFuseEntry> GetFolderList(string path) { /* list "/" ... */ }
    public int ReadFile(IFuseEntry entry, Span<byte> buffer, long offset) { /* fill buffer ... */ }
}

Check the runtime, then mount (blocks until unmounted):

if (!FuseAvailability.Check(out var library))
    return; // installation guidance was already printed to stderr

var fs = new FuseFileSystem(new MyVolume());
var exitCode = fs.Run("/mnt/myvolume", debug: false, onMounted: () => Console.WriteLine("Mounted"));

FuseFileSystem.Run drives the FUSE session manually and shuts it down cleanly on Ctrl+C, SIGTERM or SIGHUP. Call fs.Exit() from any thread to request a shutdown (for example when your application closes).

To check only whether mounting is possible — without printing installation guidance — use:

if (FuseAvailability.Check(out _, candidates: null, printInstructions: false))
    Console.WriteLine("FUSE is available.");

API overview

Type Description
IFuseVolume Read-only volume: label, size, entry lookup, directory listing and file reads. Paths are POSIX-style (/ is the root).
IFuseEntry A single file or directory: name, IsDirectory and Size.
FuseFileSystem Serves a volume through the FUSE 3 high-level API (read-only). Run(mountPoint, debug, onMounted) blocks until unmount; Exit() requests a clean shutdown.
FuseAvailability Check(out libraryPath) probes libfuse3/macFUSE and /dev/fuse and prints installation guidance when missing.

The volume is exposed read-only: open rejects write access, macOS setattr returns EROFS, and unimplemented operations fail with ENOSYS.

License

MIT — see LICENSE.txt. Lead Developer: Peterson Fernandes (PureLogicCode.com).

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.  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 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

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 85 10/12/2026