⚠ Deprecated: CriticalBugs
BlockIO – Low-level access to physical devices (USB, file-backed, raw). Pure sector-based streaming, GPT introspection, and future MBR support.
$ dotnet add package RoseLeDark.BlockIOBlockIO is a C# library that fills a critical gap in the Windows ecosystem: it enables direct, low-level access to physical disks and partitions — without relying on filesystem APIs or unsafe native code. Inspired by Linux tools like dd, partx, and blkid, BlockIO gives .NET developers structured, introspectable control over block devices.
Windows lacks a clean, managed way to access raw disk sectors, GPT/MBR headers, and partition boundaries. BlockIO solves this by offering:
AbstractDevice – base class for all device typesFileDevice, RamDevice, UsbDevice, VirtualDiskDeviceCreateDeviceStream() for raw accessGetPartitionById, GetPartitionByGuid, GetPartitionByNameAbstractPartition – holds LBA range, GUID, nameCreateStream() – returns a bounded stream over the partitionPartitionStream, DeviceStreamReadOnlyPartitionStreamWritePartitionStreamRWPartitionStreamIBlockStream with:
Stream CloneAsReadOnly();
Stream CloneAsWriteOnly();
Stream CloneAsReadWrite();
HeaderUtility – GPT/MBR header parsing and validation
BlockRange, StreamTraits, DeviceDescriptor – for analysis and tooling
var device = new Device("\.\\..", new GPTParser(), true);
var partition = device.GetPartitionById(0);
using var stream = partition.CreateStream(FileAccess.ReadWrite); // raw access to partition
BlockIO is not a filesystem library. It does not mount, interpret, or parse FAT, NTFS, ext4, or any other FS. It exposes structure, not content.
Dieses Projekt steht unter der European Union Public Licence v1.2 (EUPL-1.2).
Siehe LICENSES/EUPL-1.2.txt für den vollständigen Text.