Re: NSOpenPanel & NSFileTypeForHFSTypeCode
Re: NSOpenPanel & NSFileTypeForHFSTypeCode
- Subject: Re: NSOpenPanel & NSFileTypeForHFSTypeCode
- From: Chris Heimark <email@hidden>
- Date: Thu, 11 Oct 2007 09:44:36 -0400
Here is what I got for my flash drive:
Device Node: /dev/disk3s2
Device Identifier: disk3s2
Mount Point: /Volumes/chessy
Volume Name: chessy
File System: Journaled HFS+
Journal size 8192 k at offset 0x3000
Owners: Disabled
Partition Type: Apple_HFS
Bootable: Is bootable
Media Type: Generic
Protocol: USB
SMART Status: Not Supported
UUID: F9DC83F2-0C29-3F9E-8176-67C62877F365
Total Size: 125.8 MB
Free Space: 112.6 MB
Read Only: No
Ejectable: Yes
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.
And yes, my script will misbehave with blanks in volume name -
another reason to not do it that way...
Thanks for your very helpful responses ;-)
On Oct 11, 2007, at 9:30 AM, Steve Checkoway wrote:
On Oct 11, 2007, at 4:51 AM, Chris Heimark wrote:
You're right about 'diskutil' output suddenly being un-parsable
with any or all software update. It is also an issue having an
'open' shell script as a hackable entity in the resources bundle -
making my intent of limiting volumes accessed to flash drives
completely vulnerable.
Your script didn't work for me. It didn't identify either of my
drives, probably related to spaces in the name? Also, diskutil
isn't giving me any uuid info for the two drives.
I'll try your getfsstat() code to see if that might not be the
right approach for this application - though I do need to get at
the UUID as well - so maybe I'll have to use the IORegistry as well.
For one thing, doing it in code is quite a bit faster.
_______________________________________________
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