Hi,
Is there any way in Java (1.6+) to retrieve the partition disk structure? (For example: NTFS, FAT32, HFS+, or EXT3.)
External libraries are permitted.
Thanks,
Gianni
Hi,
Is there any way in Java (1.6+) to retrieve the partition disk structure? (For example: NTFS, FAT32, HFS+, or EXT3.)
External libraries are permitted.
Thanks,
Gianni
you could use Runtime.getRuntime().exec() to execute a command like sfdisk and then parse the output.
sfdisk -l /dev/hdc
unfortunately it isn't very platform independent.
Under OS X the output of "mount" includes the file system:
ravn:~ ravn$ mount
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
Here /
is of type hfs