Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: telling when a directory is really a bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: telling when a directory is really a bundle




On Oct 22, 2007, at 5:35 AM, Martin Redington wrote:

A directory is a package if:

1) it has a known suffix .app, .bundle, etc.
2) it has the bundle bit set
3) it has a known structure indicating its a bundle

I try to encourage people to distinguish between the terms "bundle" and "package", using "package" to refer to a directory that is intended to be presented to the user as a single object, and "bundle" to refer to a directory that is structured so as to be used with CFBundle/NSBundle APIs. The two concepts are sometimes related, but are independent in general; for example, applications usually are both, frameworks usually are bundles but not packages, and RTFDs are packages but are not structured as bundles. In these terms, what you are looking for is whether a particular directory is a package, and as others have noted you can use NSWorkspace (or Launch Services) to make this determination.


Douglas Davidson

_______________________________________________

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: 
 >telling when a directory is really a bundle (From: Martin Redington <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.