Re: NSOpenPanel & NSFileTypeForHFSTypeCode
Re: NSOpenPanel & NSFileTypeForHFSTypeCode
- Subject: Re: NSOpenPanel & NSFileTypeForHFSTypeCode
- From: Chris Heimark <email@hidden>
- Date: Thu, 11 Oct 2007 12:07:03 -0400
I tried the following addition to your code:
CFTypeRef cftr = IORegistryEntryCreateCFProperty (entry, CFSTR
(kIOMediaUUIDKey), kCFAllocatorDefault, 0);
if (cftr)
{
CFStringRef uuid = CFCopyDescription (cftr);
// setup to return our valuable cargo
if (uuid)
{
UUID [ fs[i].f_mntonname ] = CFStringGetCStringPtr (uuid,
kCFStringEncodingASCII);
CFRelease (uuid);
}
CFRelease (cftr);
}
cftr comes back NULL. When I trace the very bizarre path using IO
Explorer, it turns out "UUID" is not registered. I tried the
kIOMediaSizeKey as well - and oddly enough, it does not work either -
returning NULL, though it is definitely in the IO Registry path.
Puzzled in Paoli.
On Oct 11, 2007, at 9:55 AM, Steve Checkoway wrote:
On Oct 11, 2007, at 6:44 AM, Chris Heimark wrote:
It may be related to partition type. Since I have made mine
explicitly Apple_HFS and I did 'diskutil eraseVolume' on it,
perhaps this is why I have a UUID. And a new UUID is generated
every time I erase the volume.
Ah, that must be it. Mine are Fat16, I believe.
--
Steve Checkoway
_______________________________________________
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