Skip to content

C#/.NET class library to retrieve MBR/GPT/FS information from physical drives

License

Notifications You must be signed in to change notification settings

Uotan-Dev/DiskPartitionInfo-.NET8.0

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disk Partition Info

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.

Build

  • Install .NET 8 SDK on your system
  • Run dotnet build

Usage

Master Boot Record (MBR)

var mbr = DiskPartitionInfo.ReadMbr()
    .FromPath("disk.img");
    // or .FromStream(memoryStream);
    // or .FromPhysicalDriveNumber(0); (Windows only)
    // or .FromVolumeLetter("C:");     (Windows only)

GUID Partition Table (GPT)

var gpt = DiskPartitionInfo.ReadGpt()
    .Primary()
    // or .Secondary()
    .FromPath("disk.img");
    // or .FromStream(memoryStream);
    // or .FromPhysicalDriveNumber(0); (Windows only)
    // or .FromVolumeLetter("C:");     (Windows only)

Filesystem headers

Not implemented yet

Enhanced for GPT CRC32 fix(Dangerous!!!),added for UotanToolboxNT project

About

C#/.NET class library to retrieve MBR/GPT/FS information from physical drives

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%