Based on information in the link below, I believe you can do
getFileInfo -aB <directoryname>  where -aB checks to see if the bundle
attribute bit is set, unfortunately, according to information in the
same page,  
http://stackoverflow.com/questions/121147/determine-if-a-directory-is-a-bundle-or-package-in-the-mac-os-x-terminal
this will only work if the bundle attribute is set, but if its not the
folder can still be considered a bundle. In my testing .app folders
mostly do NOT have this bit set. If you look at the linked page
though, there is more useful info that might help.

On Sun, Jul 11, 2010 at 6:38 PM, Andre Garzia <an...@andregarzia.com> wrote:
> Jacque,
>
> For your mac os x programming pleasure:
>
> Mac OS X identifies bundles using three ways [1]:
>
> The Finder considers a directory to be a package if any of the following
> conditions are true:
>
> * The directory has a known filename extension: .app, .bundle, .framework,
> .plugin, .kext, and so on.
> * The directory has an extension that some other application claims
> represents a package type; see “Document Packages.”
> * The directory has its package bit set.
>
> The preferred way to specify a package is to give the package directory a
> known filename extension. For the most part, Xcode takes care of this for
> you by providing templates that apply the correct extension. All you have to
> do is create an Xcode project of the appropriate type.
>
> Most bundles are also packages. For example, applications and plug-ins are
> typically presented as a single file by the Finder. However, this is not
> true for all bundle types. In particular, a framework is a type of bundle
> that is treated as a single unit for the purposes of linking and runtime
> usage, but framework directories are transparent so that developers can view
> the header files and other resources they contain. " -- quoted from [1]
>
> I know that the developer tools comes with "SetFile" which allows you to set
> a directory as a bundle, maybe there's a way to checkout the package bit or
> something along the lines of an hypotetical "isbundle?"
>
> Andre
> [1]
> http://developer.apple.com/mac/library/documentation/CoreFoundation/Conceptual/CFBundles/AboutBundles/AboutBundles.html#//apple_ref/doc/uid/10000123i-CH100-SW1
>
> On Sun, Jul 11, 2010 at 7:20 PM, J. Landman Gay 
> <jac...@hyperactivesw.com>wrote:
>
>> Andre Garzia wrote:
>>
>>> Folks,
>>>
>>> Bundles can have more extensions than just .app.
>>>
>>
>> What about checking for a plist inside the bundle? Would that be reliable?
>> Do only apps have plists?
>>
>>
>> --
>> Jacqueline Landman Gay         |     jac...@hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
>
>
> --
> http://www.andregarzia.com All We Do Is Code.
> _______________________________________________
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to