3

Using Cocoa, how can I get list of all partitions with their mounted paths and volume names on startup disk?

Thanks.

casperOne
  • 73,706
  • 19
  • 184
  • 253
uniquepito
  • 833
  • 2
  • 9
  • 17

1 Answers1

2

Run diskutil list -plist and parse the output.

rob mayoff
  • 375,296
  • 67
  • 796
  • 848
  • This is not a clean cocoa solution, I don't want to run any external, although system, utilities. I believe there must be API for this, but I can't find it. – uniquepito Dec 01 '11 at 21:40
  • 2
    Believing it doesn't make it so. `diskutil` uses a private framework called `DiskManagement`. – rob mayoff Dec 01 '11 at 22:17