Re: "diskutil info -plist" via Cocoa object?
Re: "diskutil info -plist" via Cocoa object?
- Subject: Re: "diskutil info -plist" via Cocoa object?
- From: Ken Thomases <email@hidden>
- Date: Tue, 11 Oct 2011 21:58:40 -0500
On Oct 11, 2011, at 1:12 PM, Todd Heberlein wrote:
> I was looking at the rich information provided by diskutil:
>
> $ diskutil info -plist /Volumes/blah
>
> NSWorkspace has some of this information, but I was wondering if there is a Cocoa object that provides more of the information provided by diskutil.
>
> If not, does anyone know how is diskutil getting this information? For example getfsstat(), statfs(), ...? I'm having troubles finding the equivalent of "BusProtocol" and "Internal" values in these structures.
Look at the Disk Arbitration framework and the DADiskCopyDescription() function. One of the keys in the description dictionary is kDADiskDescriptionDeviceProtocolKey ("DADeviceProtocol"). Another is kDADiskDescriptionDeviceInternalKey ("DADeviceInternal").
I just mentioned Apple's FSMegaInfo sample in another thread. It can show you the output of DADiskCopyDescription().
https://developer.apple.com/library/mac/#samplecode/FSMegaInfo/Introduction/Intro.html
Cheers,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden