Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
- name: Build
run: dotnet build -c Release --no-restore

- name: Verify package READMEs
shell: pwsh
run: ./tools/Verify-PackageReadmes.ps1

- name: Test
timeout-minutes: 30
run: dotnet test -c Release --no-restore --logger "console;verbosity=detailed" --blame-hang --blame-hang-timeout 2m --blame-hang-dump-type full
Expand Down Expand Up @@ -72,6 +76,10 @@ jobs:
- name: Build
run: dotnet build -c Release --no-restore

- name: Verify package READMEs
shell: pwsh
run: ./tools/Verify-PackageReadmes.ps1

- name: Test
timeout-minutes: 30
run: dotnet test -c Release --no-restore -f net10.0 --logger "console;verbosity=detailed" --blame-hang --blame-hang-timeout 2m --blame-hang-dump-type full
8 changes: 8 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<Project>
<!-- Multi-targeting pack runs in the outer build, where SDK default None items
are absent. Explicitly include the local README in both outer and inner
builds, removing any default item first to avoid duplicate entries. -->
<ItemGroup Condition="'$(PackageReadmeFile)' == 'README.md'">
<None Remove="README.md" />
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<!-- Only format libraries opt in. Applications and package consumers need no analyzer. -->
<ItemGroup Condition="'$(DiscUtilsGenerateRegistration)' == 'true'">
<ProjectReference Include="$(MSBuildThisFileDirectory)SourceGenerators/DiscUtils.SourceGenerator/DiscUtils.SourceGenerator.csproj"
Expand Down
3 changes: 0 additions & 3 deletions Integrations/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\README.md" Link="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<!-- SourceLink support -->
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Mounts DiscUtils IFileSystem implementations using Dokan file system driver</Description>
<Description>Windows integration for exposing DiscUtils filesystem implementations through the Dokan filesystem driver.</Description>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<PackageTags>DiscUtils;Windows;Dokan;Mount;Filesystem</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
43 changes: 43 additions & 0 deletions Integrations/DiscUtils.MountDokan/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# LTRData.DiscUtils.MountDokan

Windows integration for exposing DiscUtils filesystem implementations through the Dokan filesystem driver.

Part of the [LTRData DiscUtils fork](https://github.com/LTRData/DiscUtils). Package IDs use `LTRData.DiscUtils`; C# namespaces remain `DiscUtils`.

## Installation

```sh
dotnet add package LTRData.DiscUtils.MountDokan
```

## Requirements and behavior

- Windows with a compatible Dokan filesystem driver installed; the package references DokanNet 2.3.0.3.
- An opened DiscUtils `IFileSystem` and its format package. This adapter does not open or detect disk images itself.
- Read/write access is constrained by the underlying filesystem, its backing stream, Dokan settings and adapter support. `ForceReadOnly` can further restrict access.

## Adapter example

Given an already opened `IFileSystem fileSystem`, create the operations object to pass to a DokanNet mount host:

```csharp
using DiscUtils.MountDokan;

using var operations = new DokanDiscUtils(
fileSystem,
DokanDiscUtilsOptions.ForceReadOnly | DokanDiscUtilsOptions.LeaveFSOpen);
// Pass operations to your DokanNet mount host and keep it alive until unmounted.
```

Constructing the adapter does not mount a drive. Configure the mount point and mount lifetime through DokanNet. `LeaveFSOpen` keeps disposal of the filesystem with the caller. Range locking callbacks are not implemented; this adapter does not add capabilities missing from the mounted filesystem.

No adapter format registration is needed. Register storage providers separately only if using DiscUtils automatic detection.

## Related packages

- [LTRData.DiscUtils](https://www.nuget.org/packages/LTRData.DiscUtils)
- [LTRData.DiscUtils.Core](https://www.nuget.org/packages/LTRData.DiscUtils.Core)

## Documentation

[Repository and capability matrix](https://github.com/LTRData/DiscUtils) · [Wiki](https://github.com/LTRData/DiscUtils/wiki) · [Migration guide](https://github.com/LTRData/DiscUtils/wiki/Migration-from-DiscUtils-to-LTRData.DiscUtils) · [Format registration and Native AOT](https://github.com/LTRData/DiscUtils/blob/HEAD/docs/native-aot-format-registration.md)
2 changes: 2 additions & 0 deletions Integrations/DiscUtils.MountFuse/DiscUtils.MountFuse.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net48;net8.0;net9.0;net10.0</TargetFrameworks>
<Nullable>enable</Nullable>
<Description>FUSE integration for exposing DiscUtils filesystem implementations on platforms supported by LTRData.FuseDotNet.</Description>
<PackageTags>DiscUtils;FUSE;Mount;Filesystem;Unix</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
41 changes: 41 additions & 0 deletions Integrations/DiscUtils.MountFuse/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# LTRData.DiscUtils.MountFuse

FUSE integration for exposing DiscUtils filesystem implementations on platforms supported by LTRData.FuseDotNet.

Part of the [LTRData DiscUtils fork](https://github.com/LTRData/DiscUtils). Package IDs use `LTRData.DiscUtils`; C# namespaces remain `DiscUtils`.

## Installation

```sh
dotnet add package LTRData.DiscUtils.MountFuse
```

## Requirements and behavior

- A FUSE environment supported by [LTRData.FuseDotNet](https://www.nuget.org/packages/LTRData.FuseDotNet), including its native FUSE dependency and mount permissions.
- An opened DiscUtils `IFileSystem` and its format package. Framework compatibility alone does not establish native FUSE support on a particular operating system.
- File writes require a writable filesystem and backing stream, supported adapter operations and suitable mount permissions.

## Adapter example

Given an already opened `IFileSystem fileSystem`, create the operations object to pass to a FuseDotNet mount host:

```csharp
using DiscUtils.MountFuse;

using var operations = new FuseDiscUtils(fileSystem, FuseDiscUtilsOptions.None);
// Pass operations to your FuseDotNet mount host and keep it alive until unmounted.
```

Constructing the adapter does not mount a filesystem. Configure the mount point and lifetime through FuseDotNet and keep the underlying filesystem/streams alive until unmounted. `AccessCheck` currently throws `NotImplementedException`; several callbacks, including link creation, are not implemented. Filesystem capabilities are an upper bound on what the mounted view can expose.

No adapter format registration is needed. Register storage providers separately only if using DiscUtils automatic detection. This package omits the net46 target used by many other DiscUtils projects.

## Related packages

- [LTRData.DiscUtils](https://www.nuget.org/packages/LTRData.DiscUtils)
- [LTRData.DiscUtils.Core](https://www.nuget.org/packages/LTRData.DiscUtils.Core)

## Documentation

[Repository and capability matrix](https://github.com/LTRData/DiscUtils) · [Wiki](https://github.com/LTRData/DiscUtils/wiki) · [Migration guide](https://github.com/LTRData/DiscUtils/wiki/Migration-from-DiscUtils-to-LTRData.DiscUtils) · [Format registration and Native AOT](https://github.com/LTRData/DiscUtils/blob/HEAD/docs/native-aot-format-registration.md)
3 changes: 0 additions & 3 deletions Library/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\README.md" Link="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<!-- SourceLink support -->
<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions Library/DiscUtils.BootConfig/DiscUtils.BootConfig.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>DiscUtils BootConfig parser</Description>
<Description>Managed .NET support for reading, creating and modifying Windows Boot Configuration Data (BCD) stores in Registry hives.</Description>

<PackageTags>DiscUtils;BootConfig</PackageTags>
<PackageTags>DiscUtils;BCD;BootConfig;Registry</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
46 changes: 46 additions & 0 deletions Library/DiscUtils.BootConfig/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# LTRData.DiscUtils.BootConfig

Managed .NET support for reading, creating and modifying Windows Boot Configuration Data (BCD) stores in Registry hives.

Part of the [LTRData DiscUtils fork](https://github.com/LTRData/DiscUtils). Package IDs use `LTRData.DiscUtils`; C# namespaces remain `DiscUtils`.

## Installation

```sh
dotnet add package LTRData.DiscUtils.BootConfig
```

## Capabilities

| Capability | Support |
| --- | --- |
| Read BCD objects and elements | Yes |
| Initialize a BCD store | Yes |
| Create / modify / remove BCD objects | Yes |

## Usage notes

Store wraps a DiscUtils.Registry.RegistryKey. It supports application, device and inherited settings objects. Initializing an empty store does not by itself create a bootable Windows configuration. No format registration is required.

## Example

```csharp
using System.IO;
using DiscUtils.BootConfig;
using DiscUtils.Registry;
using DiscUtils.Streams;

using var stream = File.Create("new-bcd.hive");
using var hive = RegistryHive.Create(stream, Ownership.None);
var store = Store.Initialize(hive.Root);
// Populate the objects and elements required by your boot configuration.
```

## Related packages

- [LTRData.DiscUtils](https://www.nuget.org/packages/LTRData.DiscUtils)
- [LTRData.DiscUtils.Core](https://www.nuget.org/packages/LTRData.DiscUtils.Core)

## Documentation

[Repository and capability matrix](https://github.com/LTRData/DiscUtils) · [Wiki](https://github.com/LTRData/DiscUtils/wiki) · [Migration guide](https://github.com/LTRData/DiscUtils/wiki/Migration-from-DiscUtils-to-LTRData.DiscUtils) · [Format registration and Native AOT](https://github.com/LTRData/DiscUtils/blob/HEAD/docs/native-aot-format-registration.md)
4 changes: 2 additions & 2 deletions Library/DiscUtils.Btrfs/DiscUtils.Btrfs.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>DiscUtils Btrfs</Description>
<Description>Managed .NET support for reading Btrfs filesystems, including file contents and filesystem metadata.</Description>
<Authors>Bianco Veigel;Olof Lagerkvist</Authors>
<PackageTags>DiscUtils;Btrfs</PackageTags>
<PackageTags>DiscUtils;Filesystem;Btrfs;Subvolumes</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
56 changes: 56 additions & 0 deletions Library/DiscUtils.Btrfs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# LTRData.DiscUtils.Btrfs

Managed .NET support for reading Btrfs filesystems, including file contents and filesystem metadata.

Part of the [LTRData DiscUtils fork](https://github.com/LTRData/DiscUtils). Package IDs use `LTRData.DiscUtils`; C# namespaces remain `DiscUtils`.

## Installation

```sh
dotnet add package LTRData.DiscUtils.Btrfs
```

## Capabilities

| Capability | Support |
| --- | --- |
| Read files and directories | Yes |
| Create a filesystem | No |
| Modify an existing filesystem | No |

## Usage notes

Includes subvolume enumeration, Unix metadata and file allocation extents. Zlib and LZO extent decompression are supported; Zstandard support is excluded from the net46 build. Filesystem feature and multi-device layout support is not universal.

## Registration

For automatic discovery, register the providers implemented by this package:

```csharp
DiscUtils.Btrfs.Formats.Register();
```

Direct use of the concrete APIs in this package does not require discovery registration. Each registration call covers only its own assembly. Register `DiscUtils.Core.Formats.Register()` as well when using generic disk opening through the local-file transport, and register other disk/filesystem providers as needed. These registration calls support trimming and Native AOT; this is not a guarantee for every operation in the package.

## Example

```csharp
using System;
using System.IO;
using DiscUtils.Btrfs;

// The stream starts at the filesystem, not at a whole disk's partition table.
using var stream = File.OpenRead("btrfs.img");
using var fs = new BtrfsFileSystem(stream);
foreach (var file in fs.Root.GetFiles())
Console.WriteLine(file.FullName);
```

## Related packages

- [LTRData.DiscUtils](https://www.nuget.org/packages/LTRData.DiscUtils)
- [LTRData.DiscUtils.Core](https://www.nuget.org/packages/LTRData.DiscUtils.Core)

## Documentation

[Repository and capability matrix](https://github.com/LTRData/DiscUtils) · [Wiki](https://github.com/LTRData/DiscUtils/wiki) · [Migration guide](https://github.com/LTRData/DiscUtils/wiki/Migration-from-DiscUtils-to-LTRData.DiscUtils) · [Format registration and Native AOT](https://github.com/LTRData/DiscUtils/blob/HEAD/docs/native-aot-format-registration.md)
4 changes: 2 additions & 2 deletions Library/DiscUtils.Containers/DiscUtils.Containers.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>DiscUtils, meta-package with container formats such as WIM, DMG, VHD, VHDX, XVA, VMDK</Description>
<Description>DiscUtils meta-package for disk and image containers, with Linux volume mapping and related image readers.</Description>

<PackageTags>DiscUtils;VHD;VHDX;XVA;VMDK;DMG</PackageTags>
<PackageTags>DiscUtils;VirtualDisk;VHD;VHDX;VDI;VMDK;DMG;WIM;XVA</PackageTags>

<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
53 changes: 53 additions & 0 deletions Library/DiscUtils.Containers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# LTRData.DiscUtils.Containers

DiscUtils meta-package for disk and image containers, with Linux volume mapping and related image readers.

Part of the [LTRData DiscUtils fork](https://github.com/LTRData/DiscUtils). Package IDs use `LTRData.DiscUtils`; C# namespaces remain `DiscUtils`.

## Installation

```sh
dotnet add package LTRData.DiscUtils.Containers
```

## Included packages

Direct package dependencies are listed below; their own dependencies are restored transitively. Choose individual packages when you need a smaller set of formats.

| Package | Purpose |
| --- | --- |
| [LTRData.DiscUtils.Core](https://www.nuget.org/packages/LTRData.DiscUtils.Core) | Common .NET disk, filesystem, partition and volume abstractions for DiscUtils, including raw disks and format-discovery infrastructure. |
| [LTRData.DiscUtils.Dmg](https://www.nuget.org/packages/LTRData.DiscUtils.Dmg) | .NET support for reading Apple DMG/UDIF disk images and decompressing supported image data. |
| [LTRData.DiscUtils.Iso9660](https://www.nuget.org/packages/LTRData.DiscUtils.Iso9660) | Managed .NET support for reading ISO 9660 optical-disc filesystems and building ISO images with Joliet and boot-image support. |
| [LTRData.DiscUtils.Lvm](https://www.nuget.org/packages/LTRData.DiscUtils.Lvm) | Managed .NET discovery and stream mapping for supported Linux LVM logical volumes and Linux MD RAID 1 members. |
| [LTRData.DiscUtils.Vhd](https://www.nuget.org/packages/LTRData.DiscUtils.Vhd) | Managed .NET support for reading, creating and modifying fixed, dynamic and differencing Microsoft VHD virtual disk images. |
| [LTRData.DiscUtils.Vhdx](https://www.nuget.org/packages/LTRData.DiscUtils.Vhdx) | Managed .NET support for reading, creating and modifying fixed, dynamic and differencing Microsoft VHDX virtual disk images. |
| [LTRData.DiscUtils.Vmdk](https://www.nuget.org/packages/LTRData.DiscUtils.Vmdk) | Managed .NET support for reading, creating and modifying supported VMware VMDK layouts, including differencing disk chains. |
| [LTRData.DiscUtils.Vdi](https://www.nuget.org/packages/LTRData.DiscUtils.Vdi) | Managed .NET support for reading, creating and modifying fixed and dynamically allocated VirtualBox VDI disk images. |
| [LTRData.DiscUtils.Wim](https://www.nuget.org/packages/LTRData.DiscUtils.Wim) | Managed .NET support for reading Windows Imaging Format (WIM) containers and accessing their image filesystems and metadata. |
| [LTRData.DiscUtils.Xva](https://www.nuget.org/packages/LTRData.DiscUtils.Xva) | Managed .NET support for reading Xen Virtual Appliance (XVA) disks and creating new XVA appliances from disk streams. |
| [LTRData.DiscUtils.OpticalDiscSharing](https://www.nuget.org/packages/LTRData.DiscUtils.OpticalDiscSharing) | .NET client for discovering and reading optical media shared through Apple Optical Disc Sharing. |

## Registration

```csharp
DiscUtils.Containers.SetupHelper.SetupContainers();
```

This helper explicitly registers providers from: `Core`, `Dmg`, `Lvm`, `Vhd`, `Vhdx`, `Vmdk`, `Vdi`, `Xva`. It is safe to repeat and supports trimming and Native AOT registration. Referencing the package alone does not register providers.

Package dependencies and registration scope are distinct. WIM has no discovery provider and is used through its direct APIs.

OpticalDiscSharing is a dependency, but SetupContainers does not register its transport. ISO 9660 and WIM readers are included for direct use; automatic ISO/UDF detection requires adding and registering OpticalDisk. SDI is not included.

Dokan/FUSE integrations and command-line utilities are not included. Registration compatibility does not establish Native AOT support for every operation in every dependency.

## Related packages

- [LTRData.DiscUtils](https://www.nuget.org/packages/LTRData.DiscUtils)
- [LTRData.DiscUtils.FileSystems](https://www.nuget.org/packages/LTRData.DiscUtils.FileSystems)
- [LTRData.DiscUtils.Transports](https://www.nuget.org/packages/LTRData.DiscUtils.Transports)

## Documentation

[Repository and capability matrix](https://github.com/LTRData/DiscUtils) · [Wiki](https://github.com/LTRData/DiscUtils/wiki) · [Migration guide](https://github.com/LTRData/DiscUtils/wiki/Migration-from-DiscUtils-to-LTRData.DiscUtils) · [Format registration and Native AOT](https://github.com/LTRData/DiscUtils/blob/HEAD/docs/native-aot-format-registration.md)
4 changes: 2 additions & 2 deletions Library/DiscUtils.Core/DiscUtils.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Implementation of the ISO, UDF, FAT and NTFS file systems is now fairly stable. VHD, XVA, VMDK and VDI disk formats are implemented, as well as read/write Registry support. The library also includes a simple iSCSI initiator, for accessing disks via iSCSI and an NFS client implementation.</Description>
<Description>Common .NET disk, filesystem, partition and volume abstractions for DiscUtils, including raw disks and format-discovery infrastructure.</Description>
<AssemblyTitle>DiscUtils (for .NET and .NET Core), core library that supports parts of DiscUtils</AssemblyTitle>
<Authors>Kenneth Bell;Quamotion;LordMike;Olof Lagerkvist</Authors>
<PackageTags>DiscUtils;VHD;VDI;XVA;VMDK;ISO;NTFS;EXT2FS</PackageTags>
<PackageTags>DiscUtils;VirtualDisk;Filesystem;Partitions;MBR;GPT;Volumes;RAW</PackageTags>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
Loading
Loading