Sunday, 25 August 2013

How can I get the partition UUID of a disk in .NET

How can I get the partition UUID of a disk in .NET

I need to be able to get the partition/filesystem UUID of a partition,
similar to how you can with VOL in WinDOS and ls -l /dev/disks/by-partuuid
in *nix, but with C# code. What's the best way to do this?
For reference, I need to be able to get the UUID from either the current
directory, or the "closest" mount upwards.
EDIT: My bad, should've said this up front: it needs to run on Mono.

No comments:

Post a Comment