• 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: NSOpenPanel & NSFileTypeForHFSTypeCode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOpenPanel & NSFileTypeForHFSTypeCode


  • Subject: Re: NSOpenPanel & NSFileTypeForHFSTypeCode
  • From: Chris Heimark <email@hidden>
  • Date: Thu, 11 Oct 2007 07:51:57 -0400

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.

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.

What is the accepted Cocoa interface to the IORegistry or am I limited to lower level calls for that as well?

On Oct 11, 2007, at 6:34 AM, Steve Checkoway wrote:


On Oct 11, 2007, at 3:08 AM, Chris Heimark wrote:

That is a great approach, not unlike mine of wrapping 'duskutil' in an 'sh'ell to do all my parsing for essentially same information, witness:
[snip]
QUALIFIED: /Volumes/chessy, UUID: F9DC83F2-0C29-3F9E-8176-67C62877F365, SPACE: 112.8 MB


So at least two approaches for finding qualified /volumes to present to user. Thanks for your help!


If you want the other information like uuid and size, you can get all of that from the io registry. Check out IORegistryExplorer for everything that's included. The advantage of doing it in code is you don't have to call an external tool. One problem with calling a tool is you have to depend on its output not changing.

--
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


  • Follow-Ups:
    • Re: NSOpenPanel & NSFileTypeForHFSTypeCode
      • From: Steve Checkoway <email@hidden>
References: 
 >NSOpenPanel & NSFileTypeForHFSTypeCode (From: Chris Heimark <email@hidden>)
 >Re: NSOpenPanel & NSFileTypeForHFSTypeCode (From: Corbin Dunn <email@hidden>)
 >Re: NSOpenPanel & NSFileTypeForHFSTypeCode (From: John Stiles <email@hidden>)
 >Re: NSOpenPanel & NSFileTypeForHFSTypeCode (From: Chris Heimark <email@hidden>)
 >Re: NSOpenPanel & NSFileTypeForHFSTypeCode (From: Steve Checkoway <email@hidden>)
 >Re: NSOpenPanel & NSFileTypeForHFSTypeCode (From: Chris Heimark <email@hidden>)
 >Re: NSOpenPanel & NSFileTypeForHFSTypeCode (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Re: Setting a shadow in -willDisplayCell causes CGContextSetStyle error?
  • Next by Date: Re: NSOpenPanel & NSFileTypeForHFSTypeCode
  • Previous by thread: Re: NSOpenPanel & NSFileTypeForHFSTypeCode
  • Next by thread: Re: NSOpenPanel & NSFileTypeForHFSTypeCode
  • Index(es):
    • Date
    • Thread