diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 9dd174cca..e6804d04e 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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 @@ -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 diff --git a/Directory.Build.targets b/Directory.Build.targets index 5172a693c..32f77930a 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,4 +1,12 @@ + + + + + + README.md - - - diff --git a/Integrations/DiscUtils.MountDokan/DiscUtils.MountDokan.csproj b/Integrations/DiscUtils.MountDokan/DiscUtils.MountDokan.csproj index d9e5c5ed2..b2115b5c5 100644 --- a/Integrations/DiscUtils.MountDokan/DiscUtils.MountDokan.csproj +++ b/Integrations/DiscUtils.MountDokan/DiscUtils.MountDokan.csproj @@ -2,9 +2,10 @@ - Mounts DiscUtils IFileSystem implementations using Dokan file system driver + Windows integration for exposing DiscUtils filesystem implementations through the Dokan filesystem driver. true enable + DiscUtils;Windows;Dokan;Mount;Filesystem diff --git a/Integrations/DiscUtils.MountDokan/README.md b/Integrations/DiscUtils.MountDokan/README.md new file mode 100644 index 000000000..df2d852bc --- /dev/null +++ b/Integrations/DiscUtils.MountDokan/README.md @@ -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) diff --git a/Integrations/DiscUtils.MountFuse/DiscUtils.MountFuse.csproj b/Integrations/DiscUtils.MountFuse/DiscUtils.MountFuse.csproj index 5668cc881..4527a2689 100644 --- a/Integrations/DiscUtils.MountFuse/DiscUtils.MountFuse.csproj +++ b/Integrations/DiscUtils.MountFuse/DiscUtils.MountFuse.csproj @@ -3,6 +3,8 @@ netstandard2.0;netstandard2.1;net48;net8.0;net9.0;net10.0 enable + FUSE integration for exposing DiscUtils filesystem implementations on platforms supported by LTRData.FuseDotNet. + DiscUtils;FUSE;Mount;Filesystem;Unix diff --git a/Integrations/DiscUtils.MountFuse/README.md b/Integrations/DiscUtils.MountFuse/README.md new file mode 100644 index 000000000..6efea3903 --- /dev/null +++ b/Integrations/DiscUtils.MountFuse/README.md @@ -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) diff --git a/Library/Directory.Build.props b/Library/Directory.Build.props index fb6c51093..d923e3901 100644 --- a/Library/Directory.Build.props +++ b/Library/Directory.Build.props @@ -14,9 +14,6 @@ README.md - - - diff --git a/Library/DiscUtils.BootConfig/DiscUtils.BootConfig.csproj b/Library/DiscUtils.BootConfig/DiscUtils.BootConfig.csproj index 5a47663df..5b38ba511 100644 --- a/Library/DiscUtils.BootConfig/DiscUtils.BootConfig.csproj +++ b/Library/DiscUtils.BootConfig/DiscUtils.BootConfig.csproj @@ -1,8 +1,8 @@ - DiscUtils BootConfig parser + Managed .NET support for reading, creating and modifying Windows Boot Configuration Data (BCD) stores in Registry hives. - DiscUtils;BootConfig + DiscUtils;BCD;BootConfig;Registry diff --git a/Library/DiscUtils.BootConfig/README.md b/Library/DiscUtils.BootConfig/README.md new file mode 100644 index 000000000..a20cd58a9 --- /dev/null +++ b/Library/DiscUtils.BootConfig/README.md @@ -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) diff --git a/Library/DiscUtils.Btrfs/DiscUtils.Btrfs.csproj b/Library/DiscUtils.Btrfs/DiscUtils.Btrfs.csproj index 87a2caa42..98f968b58 100644 --- a/Library/DiscUtils.Btrfs/DiscUtils.Btrfs.csproj +++ b/Library/DiscUtils.Btrfs/DiscUtils.Btrfs.csproj @@ -1,8 +1,8 @@  - DiscUtils Btrfs + Managed .NET support for reading Btrfs filesystems, including file contents and filesystem metadata. Bianco Veigel;Olof Lagerkvist - DiscUtils;Btrfs + DiscUtils;Filesystem;Btrfs;Subvolumes diff --git a/Library/DiscUtils.Btrfs/README.md b/Library/DiscUtils.Btrfs/README.md new file mode 100644 index 000000000..5e277d9d9 --- /dev/null +++ b/Library/DiscUtils.Btrfs/README.md @@ -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) diff --git a/Library/DiscUtils.Containers/DiscUtils.Containers.csproj b/Library/DiscUtils.Containers/DiscUtils.Containers.csproj index 2ef1ed751..a6db07e6a 100644 --- a/Library/DiscUtils.Containers/DiscUtils.Containers.csproj +++ b/Library/DiscUtils.Containers/DiscUtils.Containers.csproj @@ -1,8 +1,8 @@  - DiscUtils, meta-package with container formats such as WIM, DMG, VHD, VHDX, XVA, VMDK + DiscUtils meta-package for disk and image containers, with Linux volume mapping and related image readers. - DiscUtils;VHD;VHDX;XVA;VMDK;DMG + DiscUtils;VirtualDisk;VHD;VHDX;VDI;VMDK;DMG;WIM;XVA enable diff --git a/Library/DiscUtils.Containers/README.md b/Library/DiscUtils.Containers/README.md new file mode 100644 index 000000000..86909018c --- /dev/null +++ b/Library/DiscUtils.Containers/README.md @@ -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) diff --git a/Library/DiscUtils.Core/DiscUtils.Core.csproj b/Library/DiscUtils.Core/DiscUtils.Core.csproj index d1ac15706..4f69bfcab 100644 --- a/Library/DiscUtils.Core/DiscUtils.Core.csproj +++ b/Library/DiscUtils.Core/DiscUtils.Core.csproj @@ -1,10 +1,10 @@  - 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. + Common .NET disk, filesystem, partition and volume abstractions for DiscUtils, including raw disks and format-discovery infrastructure. DiscUtils (for .NET and .NET Core), core library that supports parts of DiscUtils Kenneth Bell;Quamotion;LordMike;Olof Lagerkvist - DiscUtils;VHD;VDI;XVA;VMDK;ISO;NTFS;EXT2FS + DiscUtils;VirtualDisk;Filesystem;Partitions;MBR;GPT;Volumes;RAW enable diff --git a/Library/DiscUtils.Core/README.md b/Library/DiscUtils.Core/README.md new file mode 100644 index 000000000..442024664 --- /dev/null +++ b/Library/DiscUtils.Core/README.md @@ -0,0 +1,58 @@ +# LTRData.DiscUtils.Core + +Common .NET disk, filesystem, partition and volume abstractions for DiscUtils, including raw disks and format-discovery infrastructure. + +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.Core +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Common disk / filesystem APIs | VirtualDisk, DiscFileSystem and related abstractions | +| Raw disk content | Read, create and write | +| BIOS/MBR and GPT partition tables | Read, initialize and modify | +| Discovery infrastructure | Disk, filesystem, transport and volume providers | + +## Usage notes + +Includes partition/volume discovery, Windows dynamic-volume mapping and file transport. Core does not contain the NTFS, FAT, ISO, VHD or other individual format implementations; reference those packages separately. Register Core for generic RAW disk and local-file transport access. Filesystem constructors generally expect a volume stream, not a whole partitioned disk. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Core.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; + +DiscUtils.Core.Formats.Register(); +using var disk = VirtualDisk.OpenDisk("disk.img", FileAccess.Read); +var volumes = new VolumeManager(disk); +foreach (var volume in volumes.GetLogicalVolumes()) + Console.WriteLine(volume.Identity); +``` + +## Related packages + +- [LTRData.DiscUtils.Streams](https://www.nuget.org/packages/LTRData.DiscUtils.Streams) +- [LTRData.DiscUtils.Containers](https://www.nuget.org/packages/LTRData.DiscUtils.Containers) +- [LTRData.DiscUtils.FileSystems](https://www.nuget.org/packages/LTRData.DiscUtils.FileSystems) + +## 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) diff --git a/Library/DiscUtils.Dmg/DiscUtils.Dmg.csproj b/Library/DiscUtils.Dmg/DiscUtils.Dmg.csproj index 7b015ea95..e8c627bc0 100644 --- a/Library/DiscUtils.Dmg/DiscUtils.Dmg.csproj +++ b/Library/DiscUtils.Dmg/DiscUtils.Dmg.csproj @@ -1,8 +1,8 @@  - DiscUtils dmg parser. Works with apple disk (.dmg) files + .NET support for reading Apple DMG/UDIF disk images and decompressing supported image data. Kenneth Bell;LordMike;quamotion;Olof Lagerkvist - DiscUtils;dmg + DiscUtils;DiskImage;DMG;UDIF;Apple true diff --git a/Library/DiscUtils.Dmg/README.md b/Library/DiscUtils.Dmg/README.md new file mode 100644 index 000000000..9a5987fff --- /dev/null +++ b/Library/DiscUtils.Dmg/README.md @@ -0,0 +1,56 @@ +# LTRData.DiscUtils.Dmg + +.NET support for reading Apple DMG/UDIF disk images and decompressing supported image data. + +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.Dmg +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read UDIF image data | Yes, including supported compression modes | +| Create UDIF images | No | +| Modify UDIF content | No | + +## Usage notes + +The UDIF content buffer is read-only even if an outer object reports a writable backing stream. Compression support includes zlib, bzip2, ADC and LZFSE. LZFSE uses LzfseSharp on modern .NET targets and lzfse-net on .NET Framework/.NET Standard targets; deployment requirements therefore depend on the selected target and decoder dependency. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Dmg.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.Dmg; +using DiscUtils.Streams; + +using var image = File.OpenRead("existing.dmg"); +using var disk = new Disk(image, Ownership.None); +Console.WriteLine(disk.Capacity); +// disk.Content exposes decompressed disk data; inspect its partitions separately. +``` + +## 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) diff --git a/Library/DiscUtils.ExFat/DiscUtils.ExFat.csproj b/Library/DiscUtils.ExFat/DiscUtils.ExFat.csproj index bb138f6f9..aeb5ee080 100644 --- a/Library/DiscUtils.ExFat/DiscUtils.ExFat.csproj +++ b/Library/DiscUtils.ExFat/DiscUtils.ExFat.csproj @@ -6,12 +6,13 @@ DiscUtils.ExFat + DiscUtils;Filesystem;exFAT ExFat DiscUtils - DiscUtils wrapper for ExFAT + Managed .NET implementation for reading, formatting and modifying exFAT filesystems. diff --git a/Library/DiscUtils.ExFat/README.md b/Library/DiscUtils.ExFat/README.md new file mode 100644 index 000000000..7625bb0c9 --- /dev/null +++ b/Library/DiscUtils.ExFat/README.md @@ -0,0 +1,56 @@ +# LTRData.DiscUtils.ExFat + +Managed .NET implementation for reading, formatting and modifying exFAT filesystems. + +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.ExFat +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read files and directories | Yes | +| Create / format a filesystem | Yes | +| Modify files and directories | Yes, with a writable backing stream | + +## Usage notes + +Use ExFatFileSystem.Format with a PhysicalVolumeInfo to format a volume. Existing filesystems expose file/directory creation, deletion, copying, moving and timestamp operations. Filesystem streams must start at the volume offset. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.ExFat.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.ExFat; + +// The stream starts at the filesystem, not at a whole disk's partition table. +using var stream = File.OpenRead("exfat.img"); +using var fs = new ExFatFileSystem(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) diff --git a/Library/DiscUtils.Ext/DiscUtils.Ext.csproj b/Library/DiscUtils.Ext/DiscUtils.Ext.csproj index 8b16021ce..d8664617a 100644 --- a/Library/DiscUtils.Ext/DiscUtils.Ext.csproj +++ b/Library/DiscUtils.Ext/DiscUtils.Ext.csproj @@ -1,7 +1,7 @@  - DiscUtils ext filesystem parser - DiscUtils;Filesystem;ext + Managed .NET support for reading Ext2, Ext3 and Ext4 filesystems, including file contents and filesystem metadata. + DiscUtils;Filesystem;Ext2;Ext3;Ext4 diff --git a/Library/DiscUtils.Ext/README.md b/Library/DiscUtils.Ext/README.md new file mode 100644 index 000000000..45fdf866e --- /dev/null +++ b/Library/DiscUtils.Ext/README.md @@ -0,0 +1,56 @@ +# LTRData.DiscUtils.Ext + +Managed .NET support for reading Ext2, Ext3 and Ext4 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.Ext +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read files and directories | Yes | +| Create a filesystem | No | +| Modify an existing filesystem | No | + +## Usage notes + +Includes Unix metadata and file-to-cluster/extent mapping. This is a reader, not a journal-replay, repair or formatting tool; support depends on the filesystem features used by the image. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Ext.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.Ext; + +// The stream starts at the filesystem, not at a whole disk's partition table. +using var stream = File.OpenRead("ext.img"); +using var fs = new ExtFileSystem(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) diff --git a/Library/DiscUtils.Fat/DiscUtils.Fat.csproj b/Library/DiscUtils.Fat/DiscUtils.Fat.csproj index 289e3e4cc..136b82a8e 100644 --- a/Library/DiscUtils.Fat/DiscUtils.Fat.csproj +++ b/Library/DiscUtils.Fat/DiscUtils.Fat.csproj @@ -1,9 +1,9 @@  - DiscUtils FAT filesystem parser + Managed .NET implementation for reading, formatting and modifying FAT12, FAT16 and FAT32 filesystems. Kenneth Bell;LordMike;Olof Lagerkvist - DiscUtils;Filesystem;FAT + DiscUtils;Filesystem;FAT;FAT12;FAT16;FAT32 diff --git a/Library/DiscUtils.Fat/README.md b/Library/DiscUtils.Fat/README.md new file mode 100644 index 000000000..a73c1d136 --- /dev/null +++ b/Library/DiscUtils.Fat/README.md @@ -0,0 +1,56 @@ +# LTRData.DiscUtils.Fat + +Managed .NET implementation for reading, formatting and modifying FAT12, FAT16 and FAT32 filesystems. + +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.Fat +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read files and directories | Yes | +| Create / format a filesystem | Yes | +| Modify files and directories | Yes, with a writable backing stream | + +## Usage notes + +Includes floppy and partition formatting. Select FormatPartition for a partition or FormatFloppy for a floppy image. FAT variant, capacity and geometry constraints apply. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Fat.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.IO; +using DiscUtils; +using DiscUtils.Fat; + +using var image = File.Create("floppy.vfd"); +using var fs = FatFileSystem.FormatFloppy(image, FloppyDiskType.HighDensity, "MY FLOPPY "); +using var file = fs.OpenFile("hello.txt", FileMode.Create, FileAccess.Write); +using var writer = new StreamWriter(file); +writer.WriteLine("Hello from DiscUtils!"); +``` + +## 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) diff --git a/Library/DiscUtils.FileSystems/DiscUtils.FileSystems.csproj b/Library/DiscUtils.FileSystems/DiscUtils.FileSystems.csproj index e70247d9d..5e0cea517 100644 --- a/Library/DiscUtils.FileSystems/DiscUtils.FileSystems.csproj +++ b/Library/DiscUtils.FileSystems/DiscUtils.FileSystems.csproj @@ -1,8 +1,8 @@  - DiscUtils, meta-package with filesystems + DiscUtils meta-package for filesystem readers, supported filesystem writers and virtual filesystem abstractions. - DiscUtils;Filesystem;NTFS;ext;Hfs+;HfsPlus;FAT + DiscUtils;Filesystem;NTFS;FAT;exFAT;Ext;Btrfs;SquashFS;XFS enable diff --git a/Library/DiscUtils.FileSystems/README.md b/Library/DiscUtils.FileSystems/README.md new file mode 100644 index 000000000..bebf8bc45 --- /dev/null +++ b/Library/DiscUtils.FileSystems/README.md @@ -0,0 +1,54 @@ +# LTRData.DiscUtils.FileSystems + +DiscUtils meta-package for filesystem readers, supported filesystem writers and virtual filesystem abstractions. + +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.FileSystems +``` + +## 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.Btrfs](https://www.nuget.org/packages/LTRData.DiscUtils.Btrfs) | Managed .NET support for reading Btrfs filesystems, including file contents and filesystem metadata. | +| [LTRData.DiscUtils.ExFat](https://www.nuget.org/packages/LTRData.DiscUtils.ExFat) | Managed .NET implementation for reading, formatting and modifying exFAT filesystems. | +| [LTRData.DiscUtils.Ext](https://www.nuget.org/packages/LTRData.DiscUtils.Ext) | Managed .NET support for reading Ext2, Ext3 and Ext4 filesystems, including file contents and filesystem metadata. | +| [LTRData.DiscUtils.Fat](https://www.nuget.org/packages/LTRData.DiscUtils.Fat) | Managed .NET implementation for reading, formatting and modifying FAT12, FAT16 and FAT32 filesystems. | +| [LTRData.DiscUtils.HfsPlus](https://www.nuget.org/packages/LTRData.DiscUtils.HfsPlus) | Managed .NET support for reading HFS+ filesystems, including file contents and filesystem metadata. | +| [LTRData.DiscUtils.Ntfs](https://www.nuget.org/packages/LTRData.DiscUtils.Ntfs) | Managed .NET implementation for reading, formatting and modifying NTFS filesystems, including NTFS-specific file metadata. | +| [LTRData.DiscUtils.OpticalDisk](https://www.nuget.org/packages/LTRData.DiscUtils.OpticalDisk) | Managed .NET optical-disc image access and automatic detection of ISO 9660 and UDF filesystems. | +| [LTRData.DiscUtils.SquashFs](https://www.nuget.org/packages/LTRData.DiscUtils.SquashFs) | Managed .NET support for reading SquashFS filesystems and building new compressed SquashFS images. | +| [LTRData.DiscUtils.Swap](https://www.nuget.org/packages/LTRData.DiscUtils.Swap) | Managed .NET detection and header inspection for Linux swap areas through DiscUtils filesystem discovery. | +| [LTRData.DiscUtils.VirtualFileSystem](https://www.nuget.org/packages/LTRData.DiscUtils.VirtualFileSystem) | Composable .NET virtual filesystem trees, TAR and ZIP filesystem readers, and a TAR image builder through DiscUtils abstractions. | +| [LTRData.DiscUtils.Xfs](https://www.nuget.org/packages/LTRData.DiscUtils.Xfs) | Managed .NET support for reading XFS filesystems, including file contents and filesystem metadata. | + +## Registration + +```csharp +DiscUtils.FileSystems.SetupHelper.SetupFileSystems(); +``` + +This helper explicitly registers providers from: `Core`, `Btrfs`, `Ext`, `Fat`, `ExFat`, `HfsPlus`, `Ntfs`, `OpticalDisk`, `SquashFs`, `Swap`, `Xfs`, `VirtualFileSystem`. 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. ISO 9660 and UDF have no separate discovery providers; their detection is supplied by OpticalDisk, which this helper registers. + +ISO 9660 and UDF arrive transitively through OpticalDisk. This package also includes the limited Linux swap metadata reader. It does not include virtual disk container packages such as VHD or VHDX. + +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.Containers](https://www.nuget.org/packages/LTRData.DiscUtils.Containers) +- [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) diff --git a/Library/DiscUtils.HfsPlus/DiscUtils.HfsPlus.csproj b/Library/DiscUtils.HfsPlus/DiscUtils.HfsPlus.csproj index 0016d12a7..24576d9d3 100644 --- a/Library/DiscUtils.HfsPlus/DiscUtils.HfsPlus.csproj +++ b/Library/DiscUtils.HfsPlus/DiscUtils.HfsPlus.csproj @@ -1,8 +1,8 @@  - DiscUtils Hfs+ filesystem parser + Managed .NET support for reading HFS+ filesystems, including file contents and filesystem metadata. - DiscUtils;Filesystem;Hfs+;HfsPlus + DiscUtils;Filesystem;HFSPlus;HFS diff --git a/Library/DiscUtils.HfsPlus/README.md b/Library/DiscUtils.HfsPlus/README.md new file mode 100644 index 000000000..a1145a72f --- /dev/null +++ b/Library/DiscUtils.HfsPlus/README.md @@ -0,0 +1,56 @@ +# LTRData.DiscUtils.HfsPlus + +Managed .NET support for reading HFS+ 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.HfsPlus +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read files and directories | Yes | +| Create a filesystem | No | +| Modify an existing filesystem | No | + +## Usage notes + +Includes Unix metadata and file allocation extents. The package reads HFS+ volumes; it is not an APFS implementation. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.HfsPlus.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.HfsPlus; + +// The stream starts at the filesystem, not at a whole disk's partition table. +using var stream = File.OpenRead("hfsplus.img"); +using var fs = new HfsPlusFileSystem(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) diff --git a/Library/DiscUtils.Iscsi/DiscUtils.Iscsi.csproj b/Library/DiscUtils.Iscsi/DiscUtils.Iscsi.csproj index 789065815..484acbe48 100644 --- a/Library/DiscUtils.Iscsi/DiscUtils.Iscsi.csproj +++ b/Library/DiscUtils.Iscsi/DiscUtils.Iscsi.csproj @@ -1,8 +1,8 @@  - DiscUtils iSCSI + Managed .NET iSCSI initiator for target discovery, sessions and read/write access to remote block devices through DiscUtils. - DiscUtils;iSCSI + DiscUtils;Network;Storage;iSCSI;SCSI diff --git a/Library/DiscUtils.Iscsi/README.md b/Library/DiscUtils.Iscsi/README.md new file mode 100644 index 000000000..51ec60960 --- /dev/null +++ b/Library/DiscUtils.Iscsi/README.md @@ -0,0 +1,53 @@ +# LTRData.DiscUtils.Iscsi + +Managed .NET iSCSI initiator for target discovery, sessions and read/write access to remote block devices through DiscUtils. + +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.Iscsi +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Discover targets and LUNs | Yes | +| Read remote block devices | Yes | +| Write remote block devices | Yes, subject to target permissions | + +## Usage notes + +Initiator and Session provide explicit connections and LUN access. The package also supplies an iscsi transport for generic disk opening. This is a client library, not an iSCSI server or an operating-system initiator driver. Registration is AOT-compatible; protocol-key reflection elsewhere in iSCSI is outside that guarantee. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Iscsi.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 DiscUtils.Iscsi; + +var initiator = new Initiator(); +foreach (var target in initiator.GetTargets("192.0.2.10")) + Console.WriteLine(target); +``` + +## 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) diff --git a/Library/DiscUtils.Iso9660/DiscUtils.Iso9660.csproj b/Library/DiscUtils.Iso9660/DiscUtils.Iso9660.csproj index 543fa7bfc..601973f3c 100644 --- a/Library/DiscUtils.Iso9660/DiscUtils.Iso9660.csproj +++ b/Library/DiscUtils.Iso9660/DiscUtils.Iso9660.csproj @@ -1,8 +1,8 @@  - DiscUtils Iso9660 - DiscUtils;Optical;Iso9660 + Managed .NET support for reading ISO 9660 optical-disc filesystems and building ISO images with Joliet and boot-image support. + DiscUtils;Filesystem;Optical;ISO9660;Joliet;RockRidge diff --git a/Library/DiscUtils.Iso9660/README.md b/Library/DiscUtils.Iso9660/README.md new file mode 100644 index 000000000..0bd7ab243 --- /dev/null +++ b/Library/DiscUtils.Iso9660/README.md @@ -0,0 +1,44 @@ +# LTRData.DiscUtils.Iso9660 + +Managed .NET support for reading ISO 9660 optical-disc filesystems and building ISO images with Joliet and boot-image support. + +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.Iso9660 +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read ISO filesystems | Yes, including Joliet and Rock Ridge views | +| Create ISO images | Yes, using CDBuilder | +| Modify existing ISO filesystems | No | + +## Usage notes + +CDReader reads existing images; CDBuilder assembles new images from files, byte arrays or streams. Building a new image is distinct from editing an existing one. Automatic ISO/UDF detection is provided by LTRData.DiscUtils.OpticalDisk, not by a Formats class in this package. + +## Example + +```csharp +using System.Text; +using DiscUtils.Iso9660; + +var builder = new CDBuilder { UseJoliet = true, VolumeIdentifier = "SAMPLE" }; +builder.AddFile(@"Folder\hello.txt", Encoding.UTF8.GetBytes("Hello from DiscUtils!")); +builder.Build("sample.iso"); +``` + +## Related packages + +- [LTRData.DiscUtils.OpticalDisk](https://www.nuget.org/packages/LTRData.DiscUtils.OpticalDisk) +- [LTRData.DiscUtils](https://www.nuget.org/packages/LTRData.DiscUtils) +- [LTRData.DiscUtils.FileSystems](https://www.nuget.org/packages/LTRData.DiscUtils.FileSystems) + +## 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) diff --git a/Library/DiscUtils.Lvm/DiscUtils.Lvm.csproj b/Library/DiscUtils.Lvm/DiscUtils.Lvm.csproj index 939c49084..e19935043 100644 --- a/Library/DiscUtils.Lvm/DiscUtils.Lvm.csproj +++ b/Library/DiscUtils.Lvm/DiscUtils.Lvm.csproj @@ -1,8 +1,8 @@  - DiscUtils LVM + Managed .NET discovery and stream mapping for supported Linux LVM logical volumes and Linux MD RAID 1 members. Bianco Veigel;Olof Lagerkvist - DiscUtils;Lvm + DiscUtils;Volume;LVM;Linux;RAID1 diff --git a/Library/DiscUtils.Lvm/README.md b/Library/DiscUtils.Lvm/README.md new file mode 100644 index 000000000..dcdb04643 --- /dev/null +++ b/Library/DiscUtils.Lvm/README.md @@ -0,0 +1,58 @@ +# LTRData.DiscUtils.Lvm + +Managed .NET discovery and stream mapping for supported Linux LVM logical volumes and Linux MD RAID 1 members. + +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.Lvm +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Discover LVM physical / logical volumes | Yes | +| Read supported logical volumes | Yes: single-stripe (linear) segments | +| Discover Linux MD arrays | RAID 1 partition members | +| Create / edit LVM or MD metadata | No | + +## Usage notes + +LVM requires all referenced physical volumes and supports segments recorded as striped with exactly one stripe; multi-stripe, thin, snapshot and RAID segment layouts are not implemented. The MD provider currently discovers RAID 1 partition members. These are mapping APIs, not volume-management or array-repair tools. Mapped streams may forward writes to writable storage; open source disks read-only for inspection. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Lvm.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; + +DiscUtils.Core.Formats.Register(); +DiscUtils.Lvm.Formats.Register(); +using var disk = VirtualDisk.OpenDisk("linux.img", FileAccess.Read); +var volumes = new VolumeManager(disk); +foreach (var volume in volumes.GetLogicalVolumes()) + Console.WriteLine(volume.Identity); +``` + +## 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) diff --git a/Library/DiscUtils.Net/DiscUtils.Net.csproj b/Library/DiscUtils.Net/DiscUtils.Net.csproj index 2d3c7471a..28b6d6630 100644 --- a/Library/DiscUtils.Net/DiscUtils.Net.csproj +++ b/Library/DiscUtils.Net/DiscUtils.Net.csproj @@ -2,9 +2,9 @@ - DiscUtils NET + .NET DNS, multicast DNS and DNS service-discovery helpers used by DiscUtils network integrations. - DiscUtils;NET;DNS + DiscUtils;Network;DNS;mDNS;ServiceDiscovery diff --git a/Library/DiscUtils.Net/README.md b/Library/DiscUtils.Net/README.md new file mode 100644 index 000000000..c5b6d40a9 --- /dev/null +++ b/Library/DiscUtils.Net/README.md @@ -0,0 +1,35 @@ +# LTRData.DiscUtils.Net + +.NET DNS, multicast DNS and DNS service-discovery helpers used by DiscUtils network integrations. + +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.Net +``` + +## Usage notes + +Provides DNS record types, unicast and multicast clients, and ServiceDiscoveryClient for DNS-SD. Used by OpticalDiscSharing; it is not the iSCSI or NFS implementation. No DiscUtils format registration is needed. + +## Example + +```csharp +using System; +using DiscUtils.Net.Dns; + +using var discovery = new ServiceDiscoveryClient(); +foreach (var service in discovery.LookupServiceTypes()) + Console.WriteLine(service); +``` + +## 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) diff --git a/Library/DiscUtils.Nfs/DiscUtils.Nfs.csproj b/Library/DiscUtils.Nfs/DiscUtils.Nfs.csproj index 962e10bff..980d4e8c6 100644 --- a/Library/DiscUtils.Nfs/DiscUtils.Nfs.csproj +++ b/Library/DiscUtils.Nfs/DiscUtils.Nfs.csproj @@ -1,8 +1,8 @@  - DiscUtils Nfs - DiscUtils;Nfs + Managed .NET NFS v3 client for remote file and directory operations and NFS-backed DiscUtils disk access. + DiscUtils;Network;Filesystem;NFS;NFSv3 diff --git a/Library/DiscUtils.Nfs/README.md b/Library/DiscUtils.Nfs/README.md new file mode 100644 index 000000000..5b9ae7e06 --- /dev/null +++ b/Library/DiscUtils.Nfs/README.md @@ -0,0 +1,55 @@ +# LTRData.DiscUtils.Nfs + +Managed .NET NFS v3 client for remote file and directory operations and NFS-backed DiscUtils disk access. + +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.Nfs +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| List exports and read files | Yes | +| Create / modify / delete files and directories | Yes, subject to server permissions | +| NFS protocol version | v3 | + +## Usage notes + +NfsFileSystem exposes an export through the common filesystem API. Credentials, export policy and server capabilities govern access. The NFS transport can open disk-image files stored on an export; register their format providers separately. Not every Windows-style metadata operation maps to NFS. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Nfs.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 DiscUtils.Nfs; + +foreach (var export in NfsFileSystem.GetExports("192.0.2.10")) + Console.WriteLine(export); +using var fs = new NfsFileSystem("192.0.2.10", "/export/images"); +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) diff --git a/Library/DiscUtils.Ntfs/DiscUtils.Ntfs.csproj b/Library/DiscUtils.Ntfs/DiscUtils.Ntfs.csproj index f4a22e23d..901f15354 100644 --- a/Library/DiscUtils.Ntfs/DiscUtils.Ntfs.csproj +++ b/Library/DiscUtils.Ntfs/DiscUtils.Ntfs.csproj @@ -1,9 +1,9 @@  - DiscUtils NTFS filesystem parser + Managed .NET implementation for reading, formatting and modifying NTFS filesystems, including NTFS-specific file metadata. Kenneth Bell;LordMike;Olof Lagerkvist - DiscUtils;Filesystem;NTFS + DiscUtils;Filesystem;NTFS;AlternateDataStreams diff --git a/Library/DiscUtils.Ntfs/README.md b/Library/DiscUtils.Ntfs/README.md new file mode 100644 index 000000000..82e143d9a --- /dev/null +++ b/Library/DiscUtils.Ntfs/README.md @@ -0,0 +1,57 @@ +# LTRData.DiscUtils.Ntfs + +Managed .NET implementation for reading, formatting and modifying NTFS filesystems, including NTFS-specific file 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.Ntfs +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read files and directories | Yes | +| Create / format a filesystem | Yes | +| Modify files and directories | Yes, with a writable backing stream | + +## Usage notes + +Supports alternate data streams, security descriptors, reparse points, hard links and allocation metadata through NTFS-specific APIs. Formatting is available through NtfsFileSystem.Format. Support for these APIs does not imply support for every Windows NTFS feature. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Ntfs.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.IO; +using DiscUtils.Ntfs; + +// An existing NTFS volume image, starting at the filesystem boot sector. +using var image = File.Open("ntfs.img", FileMode.Open, FileAccess.ReadWrite); +using var fs = new NtfsFileSystem(image); +fs.CreateDirectory("Reports"); +using var file = fs.OpenFile(@"Reports\hello.txt", FileMode.Create, FileAccess.Write); +using var writer = new StreamWriter(file); +writer.WriteLine("Hello from DiscUtils!"); +``` + +## 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) diff --git a/Library/DiscUtils.OpticalDiscSharing/DiscUtils.OpticalDiscSharing.csproj b/Library/DiscUtils.OpticalDiscSharing/DiscUtils.OpticalDiscSharing.csproj index 93dc553af..ad9df22e7 100644 --- a/Library/DiscUtils.OpticalDiscSharing/DiscUtils.OpticalDiscSharing.csproj +++ b/Library/DiscUtils.OpticalDiscSharing/DiscUtils.OpticalDiscSharing.csproj @@ -2,9 +2,9 @@ - DiscUtils OpticalDiscSharing + .NET client for discovering and reading optical media shared through Apple Optical Disc Sharing. - DiscUtils;OpticalDiscSharing + DiscUtils;Network;Optical;Apple;OpticalDiscSharing diff --git a/Library/DiscUtils.OpticalDiscSharing/README.md b/Library/DiscUtils.OpticalDiscSharing/README.md new file mode 100644 index 000000000..08e1d1824 --- /dev/null +++ b/Library/DiscUtils.OpticalDiscSharing/README.md @@ -0,0 +1,54 @@ +# LTRData.DiscUtils.OpticalDiscSharing + +.NET client for discovering and reading optical media shared through Apple Optical Disc Sharing. + +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.OpticalDiscSharing +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Discover shared optical media | Yes, using DNS service discovery | +| Read shared disc content | Yes | +| Write shared disc content | No | + +## Usage notes + +Provides OpticalDiscServiceClient and Disc, plus an `ods` transport for remote optical media, with service discovery supplied by LTRData.DiscUtils.Net. A compatible sharing service and any required access approval must be available. This package is not included by the Transports meta-package; Containers references it but does not register its transport. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.OpticalDiscSharing.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 DiscUtils.OpticalDiscSharing; + +using var client = new OpticalDiscServiceClient(); +foreach (var service in client.LookupServices()) + Console.WriteLine(service.DisplayName); +``` + +## Related packages + +- [LTRData.DiscUtils.Net](https://www.nuget.org/packages/LTRData.DiscUtils.Net) +- [LTRData.DiscUtils.OpticalDisk](https://www.nuget.org/packages/LTRData.DiscUtils.OpticalDisk) +- [LTRData.DiscUtils](https://www.nuget.org/packages/LTRData.DiscUtils) + +## 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) diff --git a/Library/DiscUtils.OpticalDisk/DiscUtils.OpticalDisk.csproj b/Library/DiscUtils.OpticalDisk/DiscUtils.OpticalDisk.csproj index 33797d602..488dcf856 100644 --- a/Library/DiscUtils.OpticalDisk/DiscUtils.OpticalDisk.csproj +++ b/Library/DiscUtils.OpticalDisk/DiscUtils.OpticalDisk.csproj @@ -1,8 +1,8 @@  - DiscUtils OpticalDisk + Managed .NET optical-disc image access and automatic detection of ISO 9660 and UDF filesystems. - DiscUtils;Optical;OpticalDisk + DiscUtils;Optical;ISO9660;UDF;DiskImage diff --git a/Library/DiscUtils.OpticalDisk/README.md b/Library/DiscUtils.OpticalDisk/README.md new file mode 100644 index 000000000..7f856d26a --- /dev/null +++ b/Library/DiscUtils.OpticalDisk/README.md @@ -0,0 +1,56 @@ +# LTRData.DiscUtils.OpticalDisk + +Managed .NET optical-disc image access and automatic detection of ISO 9660 and UDF filesystems. + +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.OpticalDisk +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read optical disc sector data | Yes | +| Detect ISO 9660 and UDF filesystems | Yes | +| Write optical disc sector data | No | +| Create ISO images | Via the included Iso9660 package and CDBuilder | + +## Usage notes + +This package combines the ISO 9660 and UDF readers with a read-only Disc virtual-disk wrapper and detection providers. Its Formats.Register() is the registration entry point for automatic ISO/UDF detection. It does not burn physical media. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.OpticalDisk.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; + +DiscUtils.OpticalDisk.Formats.Register(); +using var image = File.OpenRead("sample.iso"); +foreach (var format in FileSystemManager.DetectFileSystems(image)) + Console.WriteLine(format.Name); +``` + +## 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) diff --git a/Library/DiscUtils.Registry/DiscUtils.Registry.csproj b/Library/DiscUtils.Registry/DiscUtils.Registry.csproj index f3a9119d6..17df0661a 100644 --- a/Library/DiscUtils.Registry/DiscUtils.Registry.csproj +++ b/Library/DiscUtils.Registry/DiscUtils.Registry.csproj @@ -1,8 +1,8 @@  - DiscUtils Registry - DiscUtils;Registry + Managed .NET support for reading, creating and modifying Windows Registry hive files and applying pending registry transaction-log changes. + DiscUtils;Registry;Hive;TransactionLog diff --git a/Library/DiscUtils.Registry/README.md b/Library/DiscUtils.Registry/README.md new file mode 100644 index 000000000..351f5752d --- /dev/null +++ b/Library/DiscUtils.Registry/README.md @@ -0,0 +1,46 @@ +# LTRData.DiscUtils.Registry + +Managed .NET support for reading, creating and modifying Windows Registry hive files and applying pending registry transaction-log changes. + +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.Registry +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read offline Registry hives | Yes | +| Create hives | Yes | +| Modify keys and values | Yes | +| Apply pending log changes | Yes, for supported registry logs | + +## Usage notes + +This package edits hive files through streams; it does not access the live Windows Registry through Win32. RegistryHive constructors accept associated log streams, and path-based opening can locate logs. Recovery behavior depends on hive/log state and stream access. No format registration is required. + +## Example + +```csharp +using System.IO; +using DiscUtils.Registry; +using DiscUtils.Streams; + +using var stream = File.Create("settings.hive"); +using var hive = RegistryHive.Create(stream, Ownership.None); +var key = hive.Root.CreateSubKey(@"Software\Example"); +key.SetValue("Greeting", "Hello from DiscUtils!"); +``` + +## 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) diff --git a/Library/DiscUtils.Sdi/DiscUtils.Sdi.csproj b/Library/DiscUtils.Sdi/DiscUtils.Sdi.csproj index 5c7488d45..5fedb3eb5 100644 --- a/Library/DiscUtils.Sdi/DiscUtils.Sdi.csproj +++ b/Library/DiscUtils.Sdi/DiscUtils.Sdi.csproj @@ -1,8 +1,8 @@  - DiscUtils Sdi + Managed .NET reader for Microsoft Simple Deployment Image (SDI) headers, section metadata and section content streams. - DiscUtils;Sdi + DiscUtils;DiskImage;SDI;Deployment diff --git a/Library/DiscUtils.Sdi/README.md b/Library/DiscUtils.Sdi/README.md new file mode 100644 index 000000000..57a0dfe77 --- /dev/null +++ b/Library/DiscUtils.Sdi/README.md @@ -0,0 +1,45 @@ +# LTRData.DiscUtils.Sdi + +Managed .NET reader for Microsoft Simple Deployment Image (SDI) headers, section metadata and section content streams. + +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.Sdi +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read headers and sections | Yes | +| Create structured SDI images | No | +| Edit section layout / metadata | No | + +## Usage notes + +SdiFile.Sections describes image blobs and OpenSection opens their byte ranges. Section streams can forward writes if the input stream is writable; this is raw byte access, not a structured SDI writer. Open the input read-only for inspection. No format registration is required. + +## Example + +```csharp +using System; +using System.IO; +using DiscUtils.Sdi; + +using var stream = File.OpenRead("boot.sdi"); +using var image = new SdiFile(stream); +foreach (var section in image.Sections) + Console.WriteLine($"{section.Index}: {section.SectionType}, {section.Length} bytes"); +``` + +## 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) diff --git a/Library/DiscUtils.SquashFs/DiscUtils.SquashFs.csproj b/Library/DiscUtils.SquashFs/DiscUtils.SquashFs.csproj index 1c3ed9474..ad649789a 100644 --- a/Library/DiscUtils.SquashFs/DiscUtils.SquashFs.csproj +++ b/Library/DiscUtils.SquashFs/DiscUtils.SquashFs.csproj @@ -1,8 +1,8 @@  - DiscUtils SquashFs filesystem parser + Managed .NET support for reading SquashFS filesystems and building new compressed SquashFS images. - DiscUtils;Filesystem;SquashFs + DiscUtils;Filesystem;SquashFS;Compression diff --git a/Library/DiscUtils.SquashFs/README.md b/Library/DiscUtils.SquashFs/README.md new file mode 100644 index 000000000..12016a547 --- /dev/null +++ b/Library/DiscUtils.SquashFs/README.md @@ -0,0 +1,54 @@ +# LTRData.DiscUtils.SquashFs + +Managed .NET support for reading SquashFS filesystems and building new compressed SquashFS images. + +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.SquashFs +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read existing filesystems | Yes | +| Build new images | Yes, using SquashFileSystemBuilder | +| Modify an existing filesystem | No | +| Built-in compression | Zlib; other codecs require application callbacks | + +## Usage notes + +The reader handles basic and extended inode forms, sparse files, hard links and symbolic links. Configure SquashFileSystemReaderOptions.GetDecompressor or SquashFileSystemBuilderOptions.GetCompressor for codecs other than zlib. Recognizing a compression identifier does not supply that codec. Use Build(Stream) or Build(string) for larger outputs; parameterless Build() buffers the result in memory. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.SquashFs.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.Text; +using DiscUtils.SquashFs; + +var builder = new SquashFileSystemBuilder(); +builder.AddFile("hello.txt", Encoding.UTF8.GetBytes("Hello from DiscUtils!")); +builder.Build("sample.squashfs"); +``` + +## 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) diff --git a/Library/DiscUtils.Streams/DiscUtils.Streams.csproj b/Library/DiscUtils.Streams/DiscUtils.Streams.csproj index ba17345a2..472618cf6 100644 --- a/Library/DiscUtils.Streams/DiscUtils.Streams.csproj +++ b/Library/DiscUtils.Streams/DiscUtils.Streams.csproj @@ -1,9 +1,9 @@  - DiscUtils Streams + .NET sparse-stream, buffer, extent, caching and stream-building primitives used by DiscUtils storage implementations. Kenneth Bell;LordMike;Bianco Veigel;Olof Lagerkvist - DiscUtils;Streams + DiscUtils;Streams;SparseStream;Buffers;Extents enable diff --git a/Library/DiscUtils.Streams/README.md b/Library/DiscUtils.Streams/README.md new file mode 100644 index 000000000..4d33b036b --- /dev/null +++ b/Library/DiscUtils.Streams/README.md @@ -0,0 +1,38 @@ +# LTRData.DiscUtils.Streams + +.NET sparse-stream, buffer, extent, caching and stream-building primitives used by DiscUtils storage implementations. + +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.Streams +``` + +## Usage notes + +Use this package directly when you need sparse memory streams, stream composition, allocation extents, buffers or stream builders without depending on Core or a filesystem implementation. Ownership controls whether wrappers dispose the streams they wrap. No format registration is needed. + +## Example + +```csharp +using System; +using DiscUtils.Streams; + +using var stream = new SparseMemoryStream(); +stream.SetLength(1024L * 1024 * 1024); +stream.Position = stream.Length - 1; +stream.WriteByte(42); +foreach (var extent in stream.Extents) + Console.WriteLine($"{extent.Start}: {extent.Length}"); +``` + +## Related packages + +- [LTRData.DiscUtils.Core](https://www.nuget.org/packages/LTRData.DiscUtils.Core) +- [LTRData.DiscUtils.VirtualFileSystem](https://www.nuget.org/packages/LTRData.DiscUtils.VirtualFileSystem) + +## 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) diff --git a/Library/DiscUtils.Swap/DiscUtils.Swap.csproj b/Library/DiscUtils.Swap/DiscUtils.Swap.csproj index 22f0039d0..197563a0e 100644 --- a/Library/DiscUtils.Swap/DiscUtils.Swap.csproj +++ b/Library/DiscUtils.Swap/DiscUtils.Swap.csproj @@ -1,8 +1,8 @@  - DiscUtils Swap + Managed .NET detection and header inspection for Linux swap areas through DiscUtils filesystem discovery. Bianco Veigel;Olof Lagerkvist - DiscUtils;Swap + DiscUtils;Linux;Swap;Volume diff --git a/Library/DiscUtils.Swap/README.md b/Library/DiscUtils.Swap/README.md new file mode 100644 index 000000000..7552dbde0 --- /dev/null +++ b/Library/DiscUtils.Swap/README.md @@ -0,0 +1,54 @@ +# LTRData.DiscUtils.Swap + +Managed .NET detection and header inspection for Linux swap areas through DiscUtils filesystem discovery. + +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.Swap +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Detect swap signatures | Yes | +| Read swap header / volume label | Yes | +| Format or modify swap areas | No | +| Browse ordinary files / directories | Not applicable | + +## Usage notes + +SwapFileSystem recognizes SWAP-SPACE and SWAPSPACE2 signatures using a 4096-byte header page. It is a limited metadata view, not a normal directory filesystem or a swap-content recovery tool. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Swap.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.Swap; + +using var stream = File.OpenRead("swap.img"); +Console.WriteLine(SwapFileSystem.Detect(stream)); +``` + +## 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) diff --git a/Library/DiscUtils.Transports/DiscUtils.Transports.csproj b/Library/DiscUtils.Transports/DiscUtils.Transports.csproj index ce02a84ee..ad82ae5f1 100644 --- a/Library/DiscUtils.Transports/DiscUtils.Transports.csproj +++ b/Library/DiscUtils.Transports/DiscUtils.Transports.csproj @@ -1,8 +1,8 @@  - DiscUtils, meta-package with transports, such as iSCSI and NFS + DiscUtils meta-package for iSCSI and NFS access, local-file transport and optical-disc detection. - DiscUtils;iSCSI;NFS + DiscUtils;Network;Storage;iSCSI;NFS;Optical enable diff --git a/Library/DiscUtils.Transports/README.md b/Library/DiscUtils.Transports/README.md new file mode 100644 index 000000000..cebebd090 --- /dev/null +++ b/Library/DiscUtils.Transports/README.md @@ -0,0 +1,46 @@ +# LTRData.DiscUtils.Transports + +DiscUtils meta-package for iSCSI and NFS access, local-file transport and optical-disc detection. + +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.Transports +``` + +## 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.Iscsi](https://www.nuget.org/packages/LTRData.DiscUtils.Iscsi) | Managed .NET iSCSI initiator for target discovery, sessions and read/write access to remote block devices through DiscUtils. | +| [LTRData.DiscUtils.Nfs](https://www.nuget.org/packages/LTRData.DiscUtils.Nfs) | Managed .NET NFS v3 client for remote file and directory operations and NFS-backed DiscUtils disk access. | +| [LTRData.DiscUtils.OpticalDisk](https://www.nuget.org/packages/LTRData.DiscUtils.OpticalDisk) | Managed .NET optical-disc image access and automatic detection of ISO 9660 and UDF filesystems. | + +## Registration + +```csharp +DiscUtils.Transports.SetupHelper.SetupTransports(); +``` + +This helper explicitly registers providers from: `Core`, `Iscsi`, `Nfs`, `OpticalDisk`. 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. Core supplies the local-file transport, Iscsi and Nfs supply their network transports, and OpticalDisk supplies optical-disc image access and ISO/UDF detection. + +OpticalDisk brings ISO 9660 and UDF readers transitively. Apple Optical Disc Sharing is a separate package and is not included. Register the corresponding format providers separately when opening disk-image files over a transport. + +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.Containers](https://www.nuget.org/packages/LTRData.DiscUtils.Containers) +- [LTRData.DiscUtils.FileSystems](https://www.nuget.org/packages/LTRData.DiscUtils.FileSystems) + +## 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) diff --git a/Library/DiscUtils.Udf/DiscUtils.Udf.csproj b/Library/DiscUtils.Udf/DiscUtils.Udf.csproj index 583790b2d..5ecdc7a16 100644 --- a/Library/DiscUtils.Udf/DiscUtils.Udf.csproj +++ b/Library/DiscUtils.Udf/DiscUtils.Udf.csproj @@ -1,8 +1,8 @@  - DiscUtils UDF filesystem parser. + Managed .NET reader for UDF optical-disc filesystems and their files, directories and extended attributes. - DiscUtils;Filesystem;UDF + DiscUtils;Filesystem;Optical;UDF diff --git a/Library/DiscUtils.Udf/README.md b/Library/DiscUtils.Udf/README.md new file mode 100644 index 000000000..ff447fc96 --- /dev/null +++ b/Library/DiscUtils.Udf/README.md @@ -0,0 +1,47 @@ +# LTRData.DiscUtils.Udf + +Managed .NET reader for UDF optical-disc filesystems and their files, directories and extended attributes. + +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.Udf +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read files and directories | Yes | +| Create a filesystem | No | +| Modify an existing filesystem | No | + +## Usage notes + +UdfReader exposes files and extended attributes. Size, UsedSpace and AvailableSpace are not implemented. For automatic ISO/UDF detection, reference LTRData.DiscUtils.OpticalDisk and register its providers; this package has no generated Formats entry point. + +## Example + +```csharp +using System; +using System.IO; +using DiscUtils.Udf; + +// The stream starts at the filesystem, not at a whole disk's partition table. +using var stream = File.OpenRead("disc.udf"); +using var fs = new UdfReader(stream); +foreach (var file in fs.Root.GetFiles()) + Console.WriteLine(file.FullName); +``` + +## Related packages + +- [LTRData.DiscUtils.OpticalDisk](https://www.nuget.org/packages/LTRData.DiscUtils.OpticalDisk) +- [LTRData.DiscUtils](https://www.nuget.org/packages/LTRData.DiscUtils) +- [LTRData.DiscUtils.FileSystems](https://www.nuget.org/packages/LTRData.DiscUtils.FileSystems) + +## 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) diff --git a/Library/DiscUtils.Vdi/DiscUtils.Vdi.csproj b/Library/DiscUtils.Vdi/DiscUtils.Vdi.csproj index 986ad0093..e0a3ac528 100644 --- a/Library/DiscUtils.Vdi/DiscUtils.Vdi.csproj +++ b/Library/DiscUtils.Vdi/DiscUtils.Vdi.csproj @@ -1,8 +1,8 @@  - DiscUtils Vdi + Managed .NET support for reading, creating and modifying fixed and dynamically allocated VirtualBox VDI disk images. - DiscUtils;Vdi + DiscUtils;VirtualDisk;VDI;VirtualBox diff --git a/Library/DiscUtils.Vdi/README.md b/Library/DiscUtils.Vdi/README.md new file mode 100644 index 000000000..ca428e070 --- /dev/null +++ b/Library/DiscUtils.Vdi/README.md @@ -0,0 +1,55 @@ +# LTRData.DiscUtils.Vdi + +Managed .NET support for reading, creating and modifying fixed and dynamically allocated VirtualBox VDI disk images. + +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.Vdi +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read fixed / dynamic images | Yes | +| Create fixed / dynamic images | Yes | +| Write virtual disk content | Yes | +| Create differencing images | No | + +## Usage notes + +Differencing-disk creation APIs throw NotImplementedException. Use Disk.Content for virtual sectors, with separate filesystem packages to interpret partitions. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Vdi.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.Vdi; + +using var disk = new Disk("existing.vdi", FileAccess.Read); +Console.WriteLine(disk.Capacity); +// disk.Content is the virtual disk's sector data, including any partition table. +``` + +## 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) diff --git a/Library/DiscUtils.Vhd/DiscUtils.Vhd.csproj b/Library/DiscUtils.Vhd/DiscUtils.Vhd.csproj index 153a43916..ca1f16c35 100644 --- a/Library/DiscUtils.Vhd/DiscUtils.Vhd.csproj +++ b/Library/DiscUtils.Vhd/DiscUtils.Vhd.csproj @@ -1,8 +1,8 @@  - DiscUtils VHD - DiscUtils;VHD + Managed .NET support for reading, creating and modifying fixed, dynamic and differencing Microsoft VHD virtual disk images. + DiscUtils;VirtualDisk;VHD;Differencing diff --git a/Library/DiscUtils.Vhd/README.md b/Library/DiscUtils.Vhd/README.md new file mode 100644 index 000000000..c362b60f7 --- /dev/null +++ b/Library/DiscUtils.Vhd/README.md @@ -0,0 +1,56 @@ +# LTRData.DiscUtils.Vhd + +Managed .NET support for reading, creating and modifying fixed, dynamic and differencing Microsoft VHD virtual disk images. + +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.Vhd +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read existing images | Yes | +| Create fixed / dynamic images | Yes | +| Create differencing images | Yes | +| Write virtual disk content | Yes, for writable images | +| Parent chains | Yes | + +## Usage notes + +Disk.Content exposes virtual sectors. A disk image and a filesystem are separate layers: add partitioning and filesystem packages to work with files inside the disk. Parent images must be accessible when opening differencing disks. This package does not install a Windows virtual-disk driver. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Vhd.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.IO; +using DiscUtils.Vhd; +using DiscUtils.Streams; + +using var image = File.Create("new.vhd"); +using var disk = Disk.InitializeDynamic(image, Ownership.None, 64L * 1024 * 1024); +// The new disk is blank; partition and format disk.Content as needed. +``` + +## 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) diff --git a/Library/DiscUtils.Vhdx/DiscUtils.Vhdx.csproj b/Library/DiscUtils.Vhdx/DiscUtils.Vhdx.csproj index 4c4cf0c8c..be1c7eb3f 100644 --- a/Library/DiscUtils.Vhdx/DiscUtils.Vhdx.csproj +++ b/Library/DiscUtils.Vhdx/DiscUtils.Vhdx.csproj @@ -1,8 +1,8 @@  - DiscUtils VHDX - DiscUtils;VHDX + Managed .NET support for reading, creating and modifying fixed, dynamic and differencing Microsoft VHDX virtual disk images. + DiscUtils;VirtualDisk;VHDX;Differencing diff --git a/Library/DiscUtils.Vhdx/README.md b/Library/DiscUtils.Vhdx/README.md new file mode 100644 index 000000000..efad53ebb --- /dev/null +++ b/Library/DiscUtils.Vhdx/README.md @@ -0,0 +1,56 @@ +# LTRData.DiscUtils.Vhdx + +Managed .NET support for reading, creating and modifying fixed, dynamic and differencing Microsoft VHDX virtual disk images. + +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.Vhdx +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read existing images | Yes | +| Create fixed / dynamic images | Yes | +| Create differencing images | Yes | +| Write virtual disk content | Yes, for writable images | +| Parent chains | Yes | + +## Usage notes + +Disk.Content exposes virtual sectors. A disk image and a filesystem are separate layers: add partitioning and filesystem packages to work with files inside the disk. Parent images must be accessible when opening differencing disks. This package does not install a Windows virtual-disk driver. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Vhdx.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.IO; +using DiscUtils.Vhdx; +using DiscUtils.Streams; + +using var image = File.Create("new.vhdx"); +using var disk = Disk.InitializeDynamic(image, Ownership.None, 64L * 1024 * 1024); +// The new disk is blank; partition and format disk.Content as needed. +``` + +## 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) diff --git a/Library/DiscUtils.VirtualFileSystem/DiscUtils.VirtualFileSystem.csproj b/Library/DiscUtils.VirtualFileSystem/DiscUtils.VirtualFileSystem.csproj index 2f08a689e..2bec77e7f 100644 --- a/Library/DiscUtils.VirtualFileSystem/DiscUtils.VirtualFileSystem.csproj +++ b/Library/DiscUtils.VirtualFileSystem/DiscUtils.VirtualFileSystem.csproj @@ -2,9 +2,9 @@ - DiscUtils Virtual File System + Composable .NET virtual filesystem trees, TAR and ZIP filesystem readers, and a TAR image builder through DiscUtils abstractions. Olof Lagerkvist - DiscUtils;tar;zip + DiscUtils;Filesystem;VirtualFileSystem;VFS;Streams;TAR;ZIP enable diff --git a/Library/DiscUtils.VirtualFileSystem/README.md b/Library/DiscUtils.VirtualFileSystem/README.md new file mode 100644 index 000000000..aed698ec0 --- /dev/null +++ b/Library/DiscUtils.VirtualFileSystem/README.md @@ -0,0 +1,71 @@ +# LTRData.DiscUtils.VirtualFileSystem + +Composable .NET virtual filesystem trees, TAR and ZIP filesystem readers, and a TAR image builder through DiscUtils abstractions. + +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.VirtualFileSystem +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Build a virtual directory tree | Yes | +| Supply file content | Streams or file-open delegates | +| Expose common filesystem APIs | Yes | +| Read existing TAR / ZIP archives | Yes, as read-only filesystem views | +| Create TAR archives | Yes, using TarFileSystemBuilder | +| Create ZIP archives / modify existing archives | No through these filesystem wrappers | +| Write behavior | Depends on options, callbacks and implemented operations | + +## Usage notes + +VirtualFileSystem, its directory/file entries and VirtualFileSystemOptions let applications compose a filesystem view. TarFileSystem and ZipFileSystem provide read-only archive views; TarFileSystemBuilder builds new TAR images. The TAR view skips symbolic links. ZIP entries are decompressed into memory when opened, including large entries backed by sparse memory buffers. CopyFile is not implemented; some metadata APIs also have limitations. Freeze can make an assembled tree read-only. Registration enables automatic TAR/ZIP filesystem detection; no registration is needed to construct a tree or use the readers/builder directly. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.VirtualFileSystem.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 DiscUtils.VirtualFileSystem; + +using var fs = new VirtualFileSystem(new VirtualFileSystemOptions { CanWrite = true }); +fs.AddDirectory("Reports"); +fs.Freeze(); +Console.WriteLine(fs.DirectoryExists("Reports")); +``` + +### Open a TAR filesystem view + +```csharp +using System; +using System.IO; +using DiscUtils.VirtualFileSystem; + +using var archive = File.OpenRead("files.tar"); +using var fs = new TarFileSystem(archive, ownsStream: false); +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) diff --git a/Library/DiscUtils.Vmdk/DiscUtils.Vmdk.csproj b/Library/DiscUtils.Vmdk/DiscUtils.Vmdk.csproj index 57168fbcb..2ce10cab8 100644 --- a/Library/DiscUtils.Vmdk/DiscUtils.Vmdk.csproj +++ b/Library/DiscUtils.Vmdk/DiscUtils.Vmdk.csproj @@ -1,8 +1,8 @@  - DiscUtils VMDK - DiscUtils;VMDK + Managed .NET support for reading, creating and modifying supported VMware VMDK layouts, including differencing disk chains. + DiscUtils;VirtualDisk;VMDK;VMware;Differencing diff --git a/Library/DiscUtils.Vmdk/README.md b/Library/DiscUtils.Vmdk/README.md new file mode 100644 index 000000000..91afc27cd --- /dev/null +++ b/Library/DiscUtils.Vmdk/README.md @@ -0,0 +1,55 @@ +# LTRData.DiscUtils.Vmdk + +Managed .NET support for reading, creating and modifying supported VMware VMDK layouts, including differencing disk chains. + +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.Vmdk +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read existing images | Yes, for supported layouts | +| Create new images | Yes, for supported DiskCreateType values | +| Write virtual disk content | Yes, for writable layouts | +| Differencing disks and parent chains | Yes | + +## Usage notes + +Support varies by extent/layout type. Compressed hosted-sparse extents are read-only. Opening from a single Stream is more restricted than path-based opening, which can resolve descriptor files, external extents and parents. Creation support is not implied for every DiskCreateType enum value. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Vmdk.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.Vmdk; + +using var disk = new Disk("existing.vmdk", FileAccess.Read); +Console.WriteLine(disk.Capacity); +// disk.Content is the virtual disk's sector data, including any partition table. +``` + +## 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) diff --git a/Library/DiscUtils.Wim/DiscUtils.Wim.csproj b/Library/DiscUtils.Wim/DiscUtils.Wim.csproj index b8a412b28..2833bcee3 100644 --- a/Library/DiscUtils.Wim/DiscUtils.Wim.csproj +++ b/Library/DiscUtils.Wim/DiscUtils.Wim.csproj @@ -1,7 +1,7 @@  - DiscUtils WIM - DiscUtils;WIM + Managed .NET support for reading Windows Imaging Format (WIM) containers and accessing their image filesystems and metadata. + DiscUtils;DiskImage;Filesystem;WIM;Windows enable diff --git a/Library/DiscUtils.Wim/README.md b/Library/DiscUtils.Wim/README.md new file mode 100644 index 000000000..6d382fef0 --- /dev/null +++ b/Library/DiscUtils.Wim/README.md @@ -0,0 +1,48 @@ +# LTRData.DiscUtils.Wim + +Managed .NET support for reading Windows Imaging Format (WIM) containers and accessing their image filesystems and 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.Wim +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read WIM images and files | Yes | +| Create WIM containers | No | +| Modify existing WIM images | No | +| Resource decompression | XPRESS and LZX | + +## Usage notes + +WimFile can contain multiple filesystem images; GetImage uses a zero-based index. These are file-based images, not virtual disk sector streams. This is not a general ESD/LZMS decoder. Use WimFile directly; this package has no generated format-registration entry point. + +## Example + +```csharp +using System; +using System.IO; +using DiscUtils.Wim; + +using var stream = File.OpenRead("install.wim"); +var wim = new WimFile(stream); +Console.WriteLine(wim.ImageCount); +using var fs = wim.GetImage(0); +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) diff --git a/Library/DiscUtils.Xfs/DiscUtils.Xfs.csproj b/Library/DiscUtils.Xfs/DiscUtils.Xfs.csproj index 3f0309aa7..dfa7c3a9f 100644 --- a/Library/DiscUtils.Xfs/DiscUtils.Xfs.csproj +++ b/Library/DiscUtils.Xfs/DiscUtils.Xfs.csproj @@ -1,8 +1,8 @@  - DiscUtils XFS + Managed .NET support for reading XFS filesystems, including file contents and filesystem metadata. Bianco Veigel;Olof Lagerkvist - DiscUtils;Xfs + DiscUtils;Filesystem;XFS diff --git a/Library/DiscUtils.Xfs/README.md b/Library/DiscUtils.Xfs/README.md new file mode 100644 index 000000000..d658c17b0 --- /dev/null +++ b/Library/DiscUtils.Xfs/README.md @@ -0,0 +1,56 @@ +# LTRData.DiscUtils.Xfs + +Managed .NET support for reading XFS 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.Xfs +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read files and directories | Yes | +| Create a filesystem | No | +| Modify an existing filesystem | No | + +## Usage notes + +Includes Unix metadata and file allocation extents. The implementation does not format, repair or modify XFS volumes. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Xfs.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.Xfs; + +// The stream starts at the filesystem, not at a whole disk's partition table. +using var stream = File.OpenRead("xfs.img"); +using var fs = new XfsFileSystem(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) diff --git a/Library/DiscUtils.Xva/DiscUtils.Xva.csproj b/Library/DiscUtils.Xva/DiscUtils.Xva.csproj index 6a2a7d45d..5958c00a7 100644 --- a/Library/DiscUtils.Xva/DiscUtils.Xva.csproj +++ b/Library/DiscUtils.Xva/DiscUtils.Xva.csproj @@ -1,8 +1,8 @@  - DiscUtils XVA - DiscUtils;XVA + Managed .NET support for reading Xen Virtual Appliance (XVA) disks and creating new XVA appliances from disk streams. + DiscUtils;DiskImage;XVA;Xen diff --git a/Library/DiscUtils.Xva/README.md b/Library/DiscUtils.Xva/README.md new file mode 100644 index 000000000..b081b681a --- /dev/null +++ b/Library/DiscUtils.Xva/README.md @@ -0,0 +1,55 @@ +# LTRData.DiscUtils.Xva + +Managed .NET support for reading Xen Virtual Appliance (XVA) disks and creating new XVA appliances from disk streams. + +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.Xva +``` + +## Capabilities + +| Capability | Support | +| --- | --- | +| Read existing appliance disks | Yes | +| Build new appliances | Yes, using VirtualMachineBuilder | +| Modify existing appliance disks | No | + +## Usage notes + +VirtualMachine exposes the disks inside an existing XVA. VirtualMachineBuilder creates minimal appliances from one or more streams. Builder support does not make existing XVA disk content writable. + +## Registration + +For automatic discovery, register the providers implemented by this package: + +```csharp +DiscUtils.Xva.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.IO; +using DiscUtils.Xva; +using DiscUtils.Streams; + +using var disk = File.OpenRead("disk.raw"); +using var builder = new VirtualMachineBuilder(); +builder.AddDisk("System disk", disk, Ownership.None); +builder.Build("appliance.xva"); +``` + +## 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) diff --git a/Library/DiscUtils/DiscUtils.csproj b/Library/DiscUtils/DiscUtils.csproj index cae2ff427..cb4c9f305 100644 --- a/Library/DiscUtils/DiscUtils.csproj +++ b/Library/DiscUtils/DiscUtils.csproj @@ -2,9 +2,9 @@ - DiscUtils, complete meta-package + Broad DiscUtils meta-package for managed .NET disk images, filesystems, storage protocols and related storage formats. - DiscUtils + DiscUtils;VirtualDisk;Filesystem;Storage true enable diff --git a/Library/DiscUtils/README.md b/Library/DiscUtils/README.md new file mode 100644 index 000000000..4c56c50f2 --- /dev/null +++ b/Library/DiscUtils/README.md @@ -0,0 +1,69 @@ +# LTRData.DiscUtils + +Broad DiscUtils meta-package for managed .NET disk images, filesystems, storage protocols and related storage formats. + +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 +``` + +## 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.Btrfs](https://www.nuget.org/packages/LTRData.DiscUtils.Btrfs) | Managed .NET support for reading Btrfs filesystems, including file contents and filesystem metadata. | +| [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.BootConfig](https://www.nuget.org/packages/LTRData.DiscUtils.BootConfig) | Managed .NET support for reading, creating and modifying Windows Boot Configuration Data (BCD) stores in Registry hives. | +| [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.ExFat](https://www.nuget.org/packages/LTRData.DiscUtils.ExFat) | Managed .NET implementation for reading, formatting and modifying exFAT filesystems. | +| [LTRData.DiscUtils.Ext](https://www.nuget.org/packages/LTRData.DiscUtils.Ext) | Managed .NET support for reading Ext2, Ext3 and Ext4 filesystems, including file contents and filesystem metadata. | +| [LTRData.DiscUtils.Fat](https://www.nuget.org/packages/LTRData.DiscUtils.Fat) | Managed .NET implementation for reading, formatting and modifying FAT12, FAT16 and FAT32 filesystems. | +| [LTRData.DiscUtils.HfsPlus](https://www.nuget.org/packages/LTRData.DiscUtils.HfsPlus) | Managed .NET support for reading HFS+ filesystems, including file contents and filesystem metadata. | +| [LTRData.DiscUtils.Iscsi](https://www.nuget.org/packages/LTRData.DiscUtils.Iscsi) | Managed .NET iSCSI initiator for target discovery, sessions and read/write access to remote block devices through DiscUtils. | +| [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.Nfs](https://www.nuget.org/packages/LTRData.DiscUtils.Nfs) | Managed .NET NFS v3 client for remote file and directory operations and NFS-backed DiscUtils disk access. | +| [LTRData.DiscUtils.Ntfs](https://www.nuget.org/packages/LTRData.DiscUtils.Ntfs) | Managed .NET implementation for reading, formatting and modifying NTFS filesystems, including NTFS-specific file metadata. | +| [LTRData.DiscUtils.OpticalDisk](https://www.nuget.org/packages/LTRData.DiscUtils.OpticalDisk) | Managed .NET optical-disc image access and automatic detection of ISO 9660 and UDF filesystems. | +| [LTRData.DiscUtils.Registry](https://www.nuget.org/packages/LTRData.DiscUtils.Registry) | Managed .NET support for reading, creating and modifying Windows Registry hive files and applying pending registry transaction-log changes. | +| [LTRData.DiscUtils.Sdi](https://www.nuget.org/packages/LTRData.DiscUtils.Sdi) | Managed .NET reader for Microsoft Simple Deployment Image (SDI) headers, section metadata and section content streams. | +| [LTRData.DiscUtils.SquashFs](https://www.nuget.org/packages/LTRData.DiscUtils.SquashFs) | Managed .NET support for reading SquashFS filesystems and building new compressed SquashFS images. | +| [LTRData.DiscUtils.Swap](https://www.nuget.org/packages/LTRData.DiscUtils.Swap) | Managed .NET detection and header inspection for Linux swap areas through DiscUtils filesystem discovery. | +| [LTRData.DiscUtils.Udf](https://www.nuget.org/packages/LTRData.DiscUtils.Udf) | Managed .NET reader for UDF optical-disc filesystems and their files, directories and extended attributes. | +| [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.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.VirtualFileSystem](https://www.nuget.org/packages/LTRData.DiscUtils.VirtualFileSystem) | Composable .NET virtual filesystem trees, TAR and ZIP filesystem readers, and a TAR image builder through DiscUtils abstractions. | +| [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.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.Xfs](https://www.nuget.org/packages/LTRData.DiscUtils.Xfs) | Managed .NET support for reading XFS filesystems, including file contents and filesystem 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.Net](https://www.nuget.org/packages/LTRData.DiscUtils.Net) | .NET DNS, multicast DNS and DNS service-discovery helpers used by DiscUtils network integrations. | +| [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.Complete.SetupHelper.SetupComplete(); +``` + +This helper explicitly registers providers from: `Core`, `Dmg`, `Btrfs`, `Ext`, `Fat`, `ExFat`, `HfsPlus`, `Iscsi`, `Nfs`, `Ntfs`, `OpticalDiscSharing`, `OpticalDisk`, `SquashFs`, `Swap`, `Vdi`, `Vhd`, `Vhdx`, `Vmdk`, `VirtualFileSystem`, `Xfs`, `Xva`, `Lvm`. 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. Libraries without discovery providers, such as WIM and Registry, are used through their direct APIs. ISO/UDF detection is supplied by OpticalDisk. + +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.Containers](https://www.nuget.org/packages/LTRData.DiscUtils.Containers) +- [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) diff --git a/README.md b/README.md index 40f67645a..5e1d0b90a 100644 --- a/README.md +++ b/README.md @@ -1,119 +1,270 @@ -# Repository URL issue, 16-18 May 2026 -In an attempt to make a separate organization account and rename my private account, the URL for this repository unfortunately got changed to my private account for about two days. This issue is now resolved and the original repository name `LTRData/DiscUtils` has been restored. +# DiscUtils -# Project Description +DiscUtils is a modular .NET library for working with disk images, virtual disks, filesystems, storage protocols and related storage formats. -DiscUtils is a .NET library to read and write ISO files and Virtual Machine disk files (VHD, VDI, XVA, VMDK, etc). DiscUtils is developed in C# with no native code (or P/Invoke). +It provides APIs for opening, inspecting, creating and, where supported, modifying storage images without mounting them through the operating system. Applications can work with complete disks, partitions, filesystems, files and directories using .NET streams and common DiscUtils abstractions. -### This fork +The core storage implementations are written in C#. Particular codec dependencies can have additional runtime requirements. The repository also contains optional platform integrations and utilities that use operating-system-specific facilities, including Dokan, FUSE and Windows VSS. -This is https://github.com/LTRData/DiscUtils +## This fork -This is a fork of https://github.com/DiscUtils/DiscUtils, a fork of https://github.com/quamotion/DiscUtils, which is a fork of https://discutils.codeplex.com/. +[LTRData.DiscUtils](https://github.com/LTRData/DiscUtils) is an actively maintained fork of [DiscUtils/DiscUtils](https://github.com/DiscUtils/DiscUtils), descended through [quamotion/DiscUtils](https://github.com/quamotion/DiscUtils) from the original CodePlex project. -This fork has the primary goal of modernized and optimized code, better compatibility with non-Windows platforms and much better performance at the cost of dropping support for older .NET Framework versions and some breaking interface changes compared to upstream DiscUtils. For example, there is support for `async` and `Span` versions of read and write on `Stream` objects throughout most I/O paths. Also, methods for enumerating files in directories return `IEnumerable` objects instead of building temporary lists and arrays. +This fork focuses on modernizing and optimizing the codebase, improving cross-platform compatibility and making use of current .NET APIs. This includes `Span` and memory-oriented APIs, asynchronous operations in many I/O paths, allocation reductions and lazy enumeration APIs. Some APIs intentionally differ from older DiscUtils releases; see the [migration guide](https://github.com/LTRData/DiscUtils/wiki/Migration-from-DiscUtils-to-LTRData.DiscUtils). -All libraries target .NET Framework 4.6 and 4.8, .NET Standard 2.0 and 2.1 as well as current LTS and STS versions of .NET. +Most library projects currently target .NET Framework 4.6 and 4.8, .NET Standard 2.0 and 2.1, and .NET 8, 9 and 10. Targets are maintained in [Library/Directory.Build.props](Library/Directory.Build.props); integrations and utilities can use a subset. A compatible target framework does not remove platform requirements of native dependencies or utilities. -### Implementation status +## Packages -Implementations of the ISO, UDF, FAT and NTFS file systems are fairly stable. Lots of work have been carried out to solve issues with Ext2/3/4, SquashFs and Btrfs implementations, but there are probably a few bugs left. It is also possible to open TAR and ZIP archives as file systems. VHD, XVA, VMDK and VDI disk formats are implemented, as well as read/write Registry support. Support for pending updates in Registry log files is also implemented. The library also includes a simple iSCSI initiator, for accessing disks via iSCSI and an NFS client implementation. +DiscUtils is organized into focused packages so applications can reference the storage formats and functionality they need. Packages share common infrastructure and restore their dependencies transitively. NuGet package names use `LTRData.DiscUtils`; C# namespaces remain `DiscUtils`. -### Wiki +| Package | Purpose | +| --- | --- | +| [LTRData.DiscUtils](Library/DiscUtils/README.md) | Broad library meta-package covering disk images, filesystems, protocols and related storage formats | +| [LTRData.DiscUtils.Containers](Library/DiscUtils.Containers/README.md) | Disk/image container packages and Linux volume mapping | +| [LTRData.DiscUtils.FileSystems](Library/DiscUtils.FileSystems/README.md) | Filesystem implementations, including ISO/UDF through OpticalDisk | +| [LTRData.DiscUtils.Transports](Library/DiscUtils.Transports/README.md) | iSCSI, NFS, local-file transport and optical-disc detection | +| [LTRData.DiscUtils.Core](Library/DiscUtils.Core/README.md) | Common disk/filesystem abstractions, RAW disks, partitioning, volumes and discovery infrastructure | +| [LTRData.DiscUtils.Streams](Library/DiscUtils.Streams/README.md) | Sparse streams, buffers, allocation extents and stream composition | +| [LTRData.DiscUtils.VirtualFileSystem](Library/DiscUtils.VirtualFileSystem/README.md) | Composable filesystem trees, TAR/ZIP readers and a TAR builder | +| [LTRData.DiscUtils.Net](Library/DiscUtils.Net/README.md) | DNS, multicast DNS and service discovery | -See more up to date documentation at the [LTRData DiscUtils Wiki](https://github.com/LTRData/DiscUtils/wiki). Developers moving from the original DiscUtils packages should start with the [migration guide](https://github.com/LTRData/DiscUtils/wiki/Migration-from-DiscUtils-to-LTRData.DiscUtils). +Each package directory has its own README with capabilities, usage notes and installation instructions. The meta-package READMEs list their exact direct dependencies and registration scope. Individual format packages are linked in the tables below and available on [NuGet](https://www.nuget.org/packages?q=LTRData.DiscUtils). -### Implementation in this repository +Platform integrations are separate packages and are not included by the main library meta-package. Utilities are applications in this repository, not part of those NuGet packages. -The DiscUtils library has been split into 25 independent projects, which can function without the others present. This reduces the "cost" of having DiscUtils immensely, as we're down from the 1 MB binary it used to be. +## Capability matrix -To work with this, four Meta packages have been created: +These tables describe implemented API capabilities, not maturity ratings or support for every feature of a format. -* [LTRData.DiscUtils](https://www.nuget.org/packages/LTRData.DiscUtils): Everything, like before -* [LTRData.DiscUtils.Containers](https://www.nuget.org/packages/LTRData.DiscUtils.Containers): such as VMDK, VHD and VHDX -* [LTRData.DiscUtils.FileSystems](https://www.nuget.org/packages/LTRData.DiscUtils.FileSystems): such as NTFS, FAT and EXT -* [LTRData.DiscUtils.Transports](https://www.nuget.org/packages/LTRData.DiscUtils.Transports): such as NFS +- **Read**: open an existing instance and access the indicated content or metadata. +- **Create**: build a new image, filesystem or structured file. +- **Modify**: change an existing instance through format-aware APIs. For virtual disks this includes writing virtual sector content; it does not imply arbitrary metadata editing, resizing or chain merging. -#### Note on detections +Creation and modification are distinct: ISO, SquashFS and XVA can be built as new images while existing images remain read-only. Writable operations also require appropriate backing-stream access. Raw byte writes forwarded by a wrapper do not establish structured format-editing support. -DiscUtils has a number of detection helpers. These provide services like "which filesystem is this stream?". Register the providers you need explicitly, using the existing meta-package setup helpers below or individual calls such as `DiscUtils.Core.Formats.Register()` and `DiscUtils.Vhd.Formats.Register()` for file-based VHD access. Each generated entry point registers only that library's providers; setup helpers compose the relevant libraries. These calls support trimming and Native AOT. Referencing a format package alone does not register it. See [format registration and Native AOT](docs/native-aot-format-registration.md) for details and third-party registration. +### Filesystems -For reflection-based plugin discovery on normal runtimes, call: +Filesystem constructors normally expect a stream beginning at the filesystem, such as a partition's content stream, rather than a whole partitioned disk image. - DiscUtils.Setup.SetupHelper.RegisterAssembly(assembly); +| Filesystem | Read | Create | Modify | Notes | +| --- | :---: | :---: | :---: | --- | +| [Btrfs](Library/DiscUtils.Btrfs/README.md) | Yes | No | No | Subvolumes, Unix metadata and allocation extents; Zstandard decompression is unavailable on net46 | +| [exFAT](Library/DiscUtils.ExFat/README.md) | Yes | Yes | Yes | Formatting and file/directory operations | +| [Ext2 / Ext3 / Ext4](Library/DiscUtils.Ext/README.md) | Yes | No | No | Unix metadata and file-to-cluster/extent mapping | +| [FAT12 / FAT16 / FAT32](Library/DiscUtils.Fat/README.md) | Yes | Yes | Yes | Includes floppy and partition formatting | +| [HFS+](Library/DiscUtils.HfsPlus/README.md) | Yes | No | No | Unix metadata and allocation extents; not APFS | +| [ISO 9660 / Joliet](Library/DiscUtils.Iso9660/README.md) | Yes | Yes | No | CDReader also supports Rock Ridge; CDBuilder builds new images, including bootable-image scenarios | +| [NTFS](Library/DiscUtils.Ntfs/README.md) | Yes | Yes | Yes | Includes alternate data streams, security descriptors, reparse points and allocation metadata | +| [SquashFS](Library/DiscUtils.SquashFs/README.md) | Yes | Yes | No | Separate reader and builder; zlib included, other codecs require callbacks | +| [UDF](Library/DiscUtils.Udf/README.md) | Yes | No | No | Size/used/free-space properties are not implemented | +| [XFS](Library/DiscUtils.Xfs/README.md) | Yes | No | No | Unix metadata and allocation extents | -Where `assembly` is the assembly you wish to register. Note that the metapackages have helpers: +### Archive filesystem views + +These adapters expose archive entries through the common filesystem API. + +| Format | Read | Create | Modify existing | Notes | +| --- | :---: | :---: | :---: | --- | +| [TAR](Library/DiscUtils.VirtualFileSystem/README.md) | Yes | Yes | No | TarFileSystem reads archives; TarFileSystemBuilder creates new ones; the filesystem view skips symbolic links | +| [ZIP](Library/DiscUtils.VirtualFileSystem/README.md) | Yes | No | No | ZipFileSystem provides a read-only view; opened file content is decompressed into memory | + +### Disk and image formats + +| Format | Read | Create | Modify | Notes | +| --- | :---: | :---: | :---: | --- | +| [RAW](Library/DiscUtils.Core/README.md) | Yes | Yes | Yes | Unstructured virtual sector data; filesystem support is separate | +| [DMG / UDIF](Library/DiscUtils.Dmg/README.md) | Yes | No | No | Read-only UDIF content, including supported compressed data; decoder dependencies vary by target framework | +| [SDI](Library/DiscUtils.Sdi/README.md) | Yes | No | No | Section/blob inspection; section streams may forward raw writes, but no structured image writer | +| [VDI](Library/DiscUtils.Vdi/README.md) | Yes | Yes | Yes | Fixed and dynamic images; differencing creation is not implemented | +| [VHD](Library/DiscUtils.Vhd/README.md) | Yes | Yes | Yes | Fixed, dynamic and differencing disks; parent chains | +| [VHDX](Library/DiscUtils.Vhdx/README.md) | Yes | Yes | Yes | Fixed, dynamic and differencing disks; parent chains | +| [VMDK](Library/DiscUtils.Vmdk/README.md) | Yes | Yes | Yes | Supported layouts and differencing disks; compressed hosted-sparse extents are read-only, single-stream opening has restrictions | +| [WIM](Library/DiscUtils.Wim/README.md) | Yes | No | No | Container with image filesystems, rather than virtual sectors; XPRESS/LZX resources | +| [XVA](Library/DiscUtils.Xva/README.md) | Yes | Yes | No | Existing disks are read-only; VirtualMachineBuilder creates appliances from disk streams | + +[OpticalDisk](Library/DiscUtils.OpticalDisk/README.md) also exposes optical-disc sector data as a read-only virtual disk and supplies automatic ISO/UDF filesystem detection. It does not burn physical media. + +### Volume and partition support + +For this table, Modify means partition/volume **metadata** management. Mapped content streams can forward writes when their backing storage is writable; use read-only source streams for inspection. + +| Format / component | Read | Create | Modify | Notes | +| --- | :---: | :---: | :---: | --- | +| [BIOS / MBR partition tables](Library/DiscUtils.Core/README.md) | Yes | Yes | Yes | Discovery, initialization, partition creation and deletion | +| [GPT partition tables](Library/DiscUtils.Core/README.md) | Yes | Yes | Yes | Discovery, initialization, partition creation and deletion | +| [Linux LVM](Library/DiscUtils.Lvm/README.md) | Yes | No | No | Single-stripe (linear) segments; all referenced physical volumes must be available | +| [Linux MD RAID](Library/DiscUtils.Lvm/README.md) | Yes | No | No | Current discovery is limited to RAID 1 partition members; not an array-management tool | +| [Linux swap](Library/DiscUtils.Swap/README.md) | Header | No | No | Signature and header metadata inspection, not an ordinary file/directory filesystem | + +Core also includes Windows dynamic-volume discovery and stream mapping for supported layouts. + +### Network storage and filesystems + +Write access depends on the server, export permissions, credentials and requested access. + +| Protocol | Read | Write | Notes | +| --- | :---: | :---: | --- | +| [iSCSI](Library/DiscUtils.Iscsi/README.md) | Yes | Yes | Target/LUN discovery and remote block access through virtual disks | +| [NFS](Library/DiscUtils.Nfs/README.md) | Yes | Yes | NFS v3 client with file/directory operations and transport support | +| [Apple Optical Disc Sharing](Library/DiscUtils.OpticalDiscSharing/README.md) | Yes | No | Remote shared optical media and service discovery | + +### Windows structured data + +These APIs operate on stored data and do not require mounting the hive in the live Windows Registry. + +| Format | Read | Create | Modify | Notes | +| --- | :---: | :---: | :---: | --- | +| [Registry hives](Library/DiscUtils.Registry/README.md) | Yes | Yes | Yes | Keys/values and pending changes from supported Registry transaction logs | +| [Boot Configuration Data](Library/DiscUtils.BootConfig/README.md) | Yes | Yes | Yes | BCD objects/elements using the Registry hive implementation | + +## Integrations + +Optional mounting adapters live under [Integrations](Integrations). They require external platform facilities in addition to the NuGet package. + +| Package | Platform | Purpose | +| --- | --- | --- | +| [LTRData.DiscUtils.MountDokan](Integrations/DiscUtils.MountDokan/README.md) | Windows with Dokan | Exposes DiscUtils IFileSystem implementations through the Dokan driver | +| [LTRData.DiscUtils.MountFuse](Integrations/DiscUtils.MountFuse/README.md) | FUSE environments supported by LTRData.FuseDotNet | Exposes DiscUtils IFileSystem implementations through FUSE | + +The mounted view is constrained by the underlying filesystem, backing-stream access, mount settings and implemented adapter callbacks. An adapter does not make a read-only filesystem writable. See each package README for prerequisites and limitations. + +## Utilities + +[Utilities](Utilities) contains applications for image creation, conversion, extraction, inspection and diagnostics. They may have additional platform requirements beyond the libraries. + +| Utility | Purpose | Requirements / scope | +| --- | --- | --- | +| [DiskClone](Utilities/DiskClone) | Clone a live physical Windows disk or selected NTFS volumes into a virtual disk image | Windows, administrator privileges and VSS; NTFS source volumes on conventional BIOS/MBR-partitioned disks | +| [VirtualDiskConvert](Utilities/VirtualDiskConvert) | Convert virtual disks between supported input/output formats | Output is limited to formats/layouts with builders | +| [DiskDump](Utilities/DiskDump) | Inspect disks, partitioning and detected filesystems | Depends on the selected format and transport | +| [FileExtract](Utilities/FileExtract) | Extract files from supported disk/filesystem images | Depends on the selected format and transport | +| [ISOCreate](Utilities/ISOCreate) | Build an ISO image from source files | Uses the ISO 9660 builder | + +The source tree contains further tools, including BCD, NTFS, VHD and VHDX diagnostics. Consult each utility's help for arguments and restrictions. + +## Format registration and Native AOT + +Referencing a format package does not register its providers with automatic discovery. Register the providers your application needs during startup: ```csharp -SetupHelper.SetupComplete(); // From LTRData.DiscUtils -SetupHelper.SetupContainers(); // From LTRData.DiscUtils.Containers -SetupHelper.SetupFileSystems(); // From LTRData.DiscUtils.FileSystems -SetupHelper.SetupTransports(); // From LTRData.DiscUtils.Transports +DiscUtils.Core.Formats.Register(); // RAW disks, local-file transport and Core providers +DiscUtils.Vhd.Formats.Register(); +DiscUtils.Fat.Formats.Register(); ``` -## How to use the Library +Each call covers only its own assembly, not its dependencies. Direct use of concrete APIs, such as constructing CDReader or initializing a VHD, does not require automatic discovery. ISO/UDF detection is registered through `DiscUtils.OpticalDisk.Formats.Register()`; Iso9660 and Udf do not have their own generated entry points. -Here's a few really simple examples. +Meta-packages provide composition helpers; choose the one appropriate to the packages you reference: -### How to create a new ISO: +```csharp +DiscUtils.Complete.SetupHelper.SetupComplete(); +DiscUtils.Containers.SetupHelper.SetupContainers(); +DiscUtils.FileSystems.SetupHelper.SetupFileSystems(); +DiscUtils.Transports.SetupHelper.SetupTransports(); +``` + +These explicit registration calls are repeatable and compatible with trimming and Native AOT. That guarantee applies to registration, not every operation in every library or integration. No application-side generator or module initializer is required. + +Reflection-based registration remains available for dynamic plugin discovery on suitable runtimes: + +```csharp +DiscUtils.Setup.SetupHelper.RegisterAssembly(assembly); +``` + +See [format registration and Native AOT](docs/native-aot-format-registration.md) for registration scope, third-party providers and remaining limitations. + +## Examples + +Examples use modern C# syntax and local image files. Reference the packages listed for each example; their dependencies supply the shared abstractions. Keep backing streams alive while their filesystem or disk objects are in use. + +### Create an ISO + +Package: [LTRData.DiscUtils.Iso9660](Library/DiscUtils.Iso9660/README.md). ```csharp -CDBuilder builder = new CDBuilder(); -builder.UseJoliet = true; -builder.VolumeIdentifier = "A_SAMPLE_DISK"; -builder.AddFile(@"Folder\Hello.txt", Encoding.ASCII.GetBytes("Hello World!")); -builder.Build(@"C:\temp\sample.iso"); -``` +using System.Text; +using DiscUtils.Iso9660; -You can add files as byte arrays (shown above), as files from the Windows filesystem, or as a Stream. By using a different form of Build, you can get a Stream to the ISO file, rather than writing it to the Windows filesystem. +var builder = new CDBuilder { UseJoliet = true, VolumeIdentifier = "A_SAMPLE_DISK" }; +builder.AddFile(@"Folder\Hello.txt", Encoding.UTF8.GetBytes("Hello World!")); +builder.Build("sample.iso"); +``` + +Files can come from byte arrays, local paths or streams. Build overloads can also return or write a stream. +### Extract a file from an ISO -### How to extract a file from an ISO: +Package: [LTRData.DiscUtils.Iso9660](Library/DiscUtils.Iso9660/README.md). ```csharp -using (FileStream isoStream = File.Open(@"C:\temp\sample.iso")) -{ - CDReader cd = new CDReader(isoStream, true); - Stream fileStream = cd.OpenFile(@"Folder\Hello.txt", FileMode.Open); - // Use fileStream... -} -``` +using System.IO; +using DiscUtils.Iso9660; + +using var image = File.OpenRead("sample.iso"); +using var cd = new CDReader(image, true); +using var file = cd.OpenFile(@"Folder\Hello.txt", FileMode.Open, FileAccess.Read); +using var output = File.Create("Hello.txt"); +file.CopyTo(output); +``` -You can also browse through the directory hierarchy, starting at cd.Root. +Browse the hierarchy through `cd.Root`. -### How to create a virtual hard disk: +### Create and format a VHD + +Packages: [LTRData.DiscUtils.Vhd](Library/DiscUtils.Vhd/README.md) and [LTRData.DiscUtils.Fat](Library/DiscUtils.Fat/README.md). ```csharp -long diskSize = 30 * 1024 * 1024; //30MB -using (Stream vhdStream = File.Create(@"C:\TEMP\mydisk.vhd")) -{ - Disk disk = Disk.InitializeDynamic(vhdStream, diskSize); - BiosPartitionTable.Initialize(disk, WellKnownPartitionType.WindowsFat); - using (FatFileSystem fs = FatFileSystem.FormatPartition(disk, 0, null)) - { - fs.CreateDirectory(@"TestDir\CHILD"); - // do other things with the file system... - } -} -``` +using System.IO; +using DiscUtils; +using DiscUtils.Fat; +using DiscUtils.Partitions; +using DiscUtils.Streams; + +using var image = File.Create("mydisk.vhd"); +using var disk = DiscUtils.Vhd.Disk.InitializeDynamic( + image, Ownership.None, 64L * 1024 * 1024); +BiosPartitionTable.Initialize(disk, WellKnownPartitionType.WindowsFat); +using var fs = FatFileSystem.FormatPartition(disk, 0, null); +fs.CreateDirectory(@"TestDir\CHILD"); +``` -As with ISOs, you can browse the file system, starting at fs.Root. +The VHD contains a partition table and a FAT filesystem; browse its files through `fs.Root`. +### Create a virtual floppy -### How to create a virtual floppy disk: +Package: [LTRData.DiscUtils.Fat](Library/DiscUtils.Fat/README.md). ```csharp -using (FileStream fs = File.Create(@"myfloppy.vfd")) -{ - using (FatFileSystem floppy = FatFileSystem.FormatFloppy(fs, FloppyDiskType.HighDensity, "MY FLOPPY ")) - { - using (Stream s = floppy.OpenFile("foo.txt", FileMode.Create)) - { - // Use stream... - } - } -} -``` - -Again, start browsing the file system at floppy.Root. +using System.IO; +using DiscUtils; +using DiscUtils.Fat; + +using var image = File.Create("myfloppy.vfd"); +using var floppy = FatFileSystem.FormatFloppy( + image, FloppyDiskType.HighDensity, "MY FLOPPY "); +using var file = floppy.OpenFile("hello.txt", FileMode.Create, FileAccess.Write); +using var writer = new StreamWriter(file); +writer.WriteLine("Hello World!"); +``` + +## Repository layout and documentation + +| Directory | Contents | +| --- | --- | +| [Library](Library) | Reusable storage implementations, infrastructure and meta-packages | +| [Integrations](Integrations) | Optional adapters for external/platform facilities | +| [Utilities](Utilities) | Applications built using DiscUtils | +| [SourceGenerators](SourceGenerators) | Build-time provider-registration generator; not a separately published NuGet package | +| [Tests](Tests) | Library, registration, source-generator and Native AOT test projects | +| [docs](docs) | Focused development and architecture documentation | + +See the [wiki](https://github.com/LTRData/DiscUtils/wiki), [migration guide](https://github.com/LTRData/DiscUtils/wiki/Migration-from-DiscUtils-to-LTRData.DiscUtils) and package READMEs for further details. When changing a package's capabilities or dependencies, update its local README and the relevant table here. Local package READMEs are checked in and packed as `README.md`; the repository overview is not copied into every package. + +To check NuGet documentation after a Release build or pack, run: + +```powershell +./tools/Verify-PackageReadmes.ps1 +``` +The check verifies that every library/integration package declares and contains its local README and matches its project description. Pass `-PackageDirectory` if packages are written outside the repository. The same check runs in CI after the Release build. diff --git a/Utilities/DiskClone/Program.cs b/Utilities/DiskClone/Program.cs index 174aa22e1..695a1bc6e 100644 --- a/Utilities/DiskClone/Program.cs +++ b/Utilities/DiskClone/Program.cs @@ -75,7 +75,7 @@ protected override StandardSwitches DefineCommandLine(CommandLineParser parser) protected override string[] HelpRemarks => [ "DiskClone clones a live disk into a virtual disk file. The volumes cloned must be formatted with NTFS, and partitioned using a conventional partition table.", - "Only Windows 7 is supported.", + "DiskClone requires Windows with Volume Shadow Copy Service (VSS).", "The tool must be run with administrator privilege." ]; diff --git a/tools/Verify-PackageReadmes.ps1 b/tools/Verify-PackageReadmes.ps1 new file mode 100644 index 000000000..62660ab0f --- /dev/null +++ b/tools/Verify-PackageReadmes.ps1 @@ -0,0 +1,95 @@ +[CmdletBinding()] +param( + [string] $RepositoryRoot = (Split-Path -Parent $PSScriptRoot), + [string] $PackageDirectory +) + +$ErrorActionPreference = 'Stop' +$RepositoryRoot = (Resolve-Path -LiteralPath $RepositoryRoot).Path +if (-not $PackageDirectory) { + $PackageDirectory = $RepositoryRoot +} + +Add-Type -AssemblyName System.IO.Compression.FileSystem + +# Utilities and SourceGenerators are not packable. These two trees share +# the LTRData.$(MSBuildProjectName) package identity convention. +$expected = @{} +foreach ($tree in @('Library', 'Integrations')) { + $projects = Get-ChildItem -Path (Join-Path $RepositoryRoot "$tree/*/*.csproj") -File + foreach ($project in $projects) { + [xml] $projectXml = Get-Content -LiteralPath $project.FullName -Raw + $id = 'LTRData.' + $project.BaseName + $readmePath = Join-Path $project.DirectoryName 'README.md' + if (-not (Test-Path -LiteralPath $readmePath -PathType Leaf)) { + throw "Missing local README: $readmePath" + } + $description = $projectXml.SelectSingleNode('/Project/PropertyGroup/Description') + if (-not $description -or -not $description.InnerText.Trim()) { + throw "Missing package description: $($project.FullName)" + } + $expected[$id] = @{ + Readme = [Convert]::ToBase64String([IO.File]::ReadAllBytes($readmePath)) + Description = $description.InnerText.Trim() + } + } +} +if ($expected.Count -eq 0) { + throw "No package projects found under $RepositoryRoot" +} + +function Read-ZipText($Entry) { + $reader = [IO.StreamReader]::new($Entry.Open()) + try { return $reader.ReadToEnd() } + finally { $reader.Dispose() } +} + +$seen = @{} +$packages = Get-ChildItem -LiteralPath $PackageDirectory -Filter '*.nupkg' -Recurse -File +foreach ($package in $packages) { + $archive = [IO.Compression.ZipFile]::OpenRead($package.FullName) + try { + $specs = @($archive.Entries | Where-Object { $_.FullName -like '*.nuspec' }) + if ($specs.Count -ne 1) { + throw "Expected one nuspec in $($package.FullName)" + } + [xml] $spec = Read-ZipText $specs[0] + $metadata = $spec.SelectSingleNode('/*[local-name()="package"]/*[local-name()="metadata"]') + $id = $metadata.SelectSingleNode('*[local-name()="id"]').InnerText + if (-not $expected.ContainsKey($id)) { continue } + + $readmeMetadata = $metadata.SelectSingleNode('*[local-name()="readme"]') + if (-not $readmeMetadata -or $readmeMetadata.InnerText -cne 'README.md') { + throw "${id}: nuspec must declare README.md" + } + $entries = @($archive.Entries | Where-Object { $_.FullName -ceq 'README.md' }) + if ($entries.Count -ne 1) { + throw "${id}: expected exactly one root README.md" + } + $stream = $entries[0].Open() + $copy = [IO.MemoryStream]::new() + try { + $stream.CopyTo($copy) + $actual = [Convert]::ToBase64String($copy.ToArray()) + } + finally { + $stream.Dispose() + $copy.Dispose() + } + if ($actual -cne $expected[$id].Readme) { + throw "${id}: packaged README differs from the project's local README" + } + $description = $metadata.SelectSingleNode('*[local-name()="description"]') + if (-not $description -or $description.InnerText.Trim() -cne $expected[$id].Description) { + throw "${id}: packaged description differs from the project description" + } + $seen[$id] = $true + } + finally { $archive.Dispose() } +} + +$missing = @($expected.Keys | Where-Object { -not $seen.ContainsKey($_) } | Sort-Object) +if ($missing.Count) { + throw "Packages missing from ${PackageDirectory}: $($missing -join ', '). Build or pack all Library and Integrations projects first." +} +Write-Host "Verified local README contents and descriptions for $($seen.Count) NuGet packages."