Disk Partition Info is a C#/.NET class library that allows you to read various low-level physical disk information such as the Master Boot Record (MBR), GUID Partition Table (GPT) and different filesystem headers like NTFS, FAT32, exFAT, ext2/ext3/ext4, etc.
It should work on both Windows, Linux and macOS although only Windows was tested.
- Install .NET 5 SDK on your system
- Run
dotnet build
var mbr = DiskPartitionInfo.ReadMbr()
.FromPath("disk.img");
// or .FromStream(memoryStream);
// or .FromPhysicalDriveNumber(0); (Windows only)
// or .FromVolumeLetter("C:"); (Windows only)
var gpt = DiskPartitionInfo.ReadGpt()
.Primary()
// or .Secondary()
.FromPath("disk.img");
// or .FromStream(memoryStream);
// or .FromPhysicalDriveNumber(0); (Windows only)
// or .FromVolumeLetter("C:"); (Windows only)
Not implemented yet