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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to