BlockIO 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:
- Safe, stream-based access to physical disks and partitions
- GPT and MBR parsing without filesystem dependency
- Partition introspection via GUID, name, or index
- Device abstraction for RAM, files, USB, and virtual disks
- Compression-ready containers for snapshots and transfer
AbstractDevice– base class for all device typesFileDevice,RamDevice,UsbDevice,VirtualDiskDeviceCreateDeviceStream()for raw accessGetPartitionById,GetPartitionByGuid,GetPartitionByName
AbstractPartition– holds LBA range, GUID, nameCreateStream()– returns a bounded stream over the partition- No filesystem logic — structure only
PartitionStream,DeviceStream- Access variants:
ReadOnlyPartitionStreamWritePartitionStreamRWPartitionStream- Same for device-level streams
- All implement
IBlockStreamwith: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 partitionBlockIO 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.