• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Disk Device Description
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disk Device Description


  • Subject: Re: Disk Device Description
  • From: Chris Suter <email@hidden>
  • Date: Thu, 12 Oct 2006 10:22:42 +1000

DiskArbitration has everything you need.

You probably want to use something like statfs, then DADiskCreateFromBSDName and then DADiskCopyDescription and you'll find one the properties returned is what you want. You'll probably want to trim the trailing 's' bit off whatever you get back from statfs before calling DADiskCreateFromBSDName.

Note that Disk Arbitration is a private framework in 10.3 (although you can still use it with a bit of effort).

- Chris

On 12/10/2006, at 4:07 AM, Michael Marmarou wrote:

Hello,
I need a way to get the device description for a mounted drive.  The
command-line program 'diskutil' does not provide this info.  Either
the description or the vendor or device ID would be fine.  As an
example, I'd like to have a method that did this:

NSString *description = [DeviceManager
descriptionForDevice:@"/Volumes/Untitled"];

Obviously that doesn't exist, and the solution doesn't have to be
cocoa, if it doesn't exist. Are there any elegant ways to do this, or
command-line programs I can use NSTask on to get this information?

Thanks,

Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
systems.com


This email sent to email@hidden



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Disk Device Description (From: "Michael Marmarou" <email@hidden>)

  • Prev by Date: setValue:forUndefinedKey:
  • Next by Date: Re: setValue:forUndefinedKey:
  • Previous by thread: Re: Disk Device Description
  • Next by thread: NSTableView editing problem...
  • Index(es):
    • Date
    • Thread