folder or bundle

Richard Gaskin ambassador at fourthworld.com
Thu Jan 21 15:51:10 EST 2010


J. Landman Gay wrote:

> stephen barncard wrote:
>> Hi again everyone,
>>
>> How does one detect the 'bundle-ness' of an OSX folder in Rev (desktop)
>> script?
>>
>> I need to filter out apps and other bundle files in a drag and drop
>> operation.
>
> I believe all bundles contain a file named "PkgInfo" at the top level of
> the bundle folder. You could check for that.

If memory serves I've removed the Pkg.info file from standalones and 
they continue to be see by the Finder as bundles.

This ADC page describes the ways bundles are identified:

--------------------------------------------------------------

How the System Identifies Bundles and Packages

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.


<http://developer.apple.com/mac/library/documentation/CoreFoundation/Conceptual/CFBundles/AboutBundles/AboutBundles.html#//apple_ref/doc/uid/10000123i-CH100-SW1>


--
  Richard Gaskin
  Fourth World
  Rev training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com
  revJournal blog: http://revjournal.com/blog.irv



More information about the use-livecode mailing list