On Mar 24, 2009, at 6:05 AM, Oleg Krupnov wrote:

My app needs to disable some functions when a disk (volume) is
unmounted, and then enable the functions back again if the *same*
volume is mounted back again.

Is there a kind of unique IDs on disks and volumes I could use for
identifying them?

Yes. Check out DADiskCopyDescription. It returns a dictionary which may include keys kDADiskDescriptionVolumeUUIDKey and kDADiskDescriptionMediaUUIDKey, one of which will probably serve your needs.

A good resource is the FSMegaInfo sample code <http://developer.apple.com/samplecode/FSMegaInfo/ >. It's a command-line tool which can call just about every file- system-querying API in Mac OS X.

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to