• 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: Correct way to tell if a path is to a .bundle?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Correct way to tell if a path is to a .bundle?


  • Subject: Re: Correct way to tell if a path is to a .bundle?
  • From: BJ Homer <email@hidden>
  • Date: Fri, 25 Sep 2009 23:23:37 -0600

> Rick,
>
> You could also use:
> NSBundle pluginBundle = [NSBundle bundleWithPath: fullPath];
>
> This will return an NSBundle object as your require or nil if fullPath does
> not identify an accessible bundle directory. So...
> if ( pluginBundle == nil ) ... then it is not a valid bundle.
>
> This isn't actually true.  For example, you can create a bundle with the
path to a flat executable, and if that executable happens to have an
Info.plist embedded inside it, you can access the values in the plist as if
it were a full bundle.  Likewise, if you point it at a random folder, you
may still get a valid object back.  I've got some rubycocoa scripts that
take advantage of that very fact.

Sorry.

-BJ
_______________________________________________

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: 
 >Correct way to tell if a path is to a .bundle? (From: Rick Mann <email@hidden>)
 >Re: Correct way to tell if a path is to a .bundle? (From: Brad Goss <email@hidden>)

  • Prev by Date: Re: Correct way to tell if a path is to a .bundle?
  • Next by Date: CPU utilization in Snow Leopard
  • Previous by thread: Re: Correct way to tell if a path is to a .bundle?
  • Next by thread: Re: Correct way to tell if a path is to a .bundle?
  • Index(es):
    • Date
    • Thread