Packages (was: copy large files in Rev on Mac)

Trevor DeVore lists at mangomultimedia.com
Sat Dec 8 07:50:36 EST 2007


On Dec 7, 2007, at 11:03 PM, Chipp Walters wrote:

> So, I mistakenly thought only .bundle extensions on folders were
> bundles-- but, you're saying there are others as well? I've 2
> questions:
>
> 1. What is the factor which determines whether a folder is treated  
> like a file?

Here are some notes I picked up from the Apple docs on Bundles.

<http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/index.html#//apple_ref/doc/uid/10000123i 
 >

To begin it appears that we have been discussing packages, not  
bundles. "It is important to remember the distinction between what is  
a bundle and what is a package. The term bundle indicates a directory  
with a specific hierarchical structure, whereas the term package  
indicates a directory that is treated as an opaque entity by the  
Finder. Most bundles (including applications and plug-ins) are also  
packages. Some bundles, such as frameworks, are not packages, however."

The Finder uses the following criteria to determine if something is a  
package:

* The directory has a known  
extension: .app, .bundle, .framework, .plugin, .kext, and so on.
* The directory has its bundle bit set.
* The directory has a known structure type indicating it is a modern  
or versioned bundle.

A developer registers their own package extensions with the operating  
system. I imagine this is one of the criteria the finder uses.

"To register a document as a package, you must modify the document  
type information in your application’s information property list  
(Info.plist) file. TheCFBundleDocumentTypes key stores information  
about the document types your application supports. For each document  
package type, include the LSTypeIsPackagekey with an appropriate  
value. The presence of this key tells the Finder and Launch Services  
to treat directories with the given file extension as a package."

> 2. How do you Mac guys handle this? IOW, when you walk through a
> folder copying, reading or moving files, how do you know whether or
> not you're looking at a folder or a file?

Personally I haven't had to handle it yet. I don't have any  
applications that just copy unknown folders around. I'm always copying  
folders where I want all contents so I don't have to make a  
distinction. It does seem like Revolution needs a better means of  
addressing this though.

-- 
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com    -    www.screensteps.com





More information about the use-livecode mailing list