• 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: External Drives Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: External Drives Questions


  • Subject: Re: External Drives Questions
  • From: Gregory Weston <email@hidden>
  • Date: Mon, 29 Jun 2009 13:00:57 -0400

Ammar Ibrahim wrote:

How can I do the following in Cocoa:
1- Get the list of mounted drives?

[[NSWorkspace sharedWorkspace] mountedLocalVolumePaths]

2- Get the serial number of the mounted drive/disk

Don't know about serial number, but for UUID you use the Disk Arbitration framework. Create a DADiskRef and get its description dictionary, then examine the keys. The volume ID is kDADiskDescriptionVolumeUUIDKey.


But note that not all volumes have UUIDs.
_______________________________________________

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


  • Prev by Date: Re: Disabling buttons in NSSavePanel
  • Next by Date: NSURL URLWithString:relativeToURL: generates an extra /
  • Previous by thread: Re: External Drives Questions
  • Next by thread: Disabling buttons in NSSavePanel
  • Index(es):
    • Date
    • Thread