• 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: Identifying disks/volumes by a unique ID?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying disks/volumes by a unique ID?


  • Subject: Re: Identifying disks/volumes by a unique ID?
  • From: Oleg Krupnov <email@hidden>
  • Date: Wed, 25 Mar 2009 14:22:19 +0200

Thanks Ken,

It looks much like what I need, however, for a FAT32 Flash USB drive
the both UUIDs are NULL. Also, I've found that for network drives and
FTP drives, the DADiskCopyDescription function returns NULL.

Is there any workaround for these issues?




On Wed, Mar 25, 2009 at 9:03 AM, Ken Thomases <email@hidden> wrote:
> 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 (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

References: 
 >Identifying disks/volumes by a unique ID? (From: Oleg Krupnov <email@hidden>)
 >Re: Identifying disks/volumes by a unique ID? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: List of open documents
  • Next by Date: Re: Uniquely identifying mounted volumes.
  • Previous by thread: Re: Identifying disks/volumes by a unique ID?
  • Next by thread: Trouble with NSAnimationContext
  • Index(es):
    • Date
    • Thread