Re: telling when a directory is really a bundle
Re: telling when a directory is really a bundle
- Subject: Re: telling when a directory is really a bundle
- From: Douglas Davidson <email@hidden>
- Date: Mon, 22 Oct 2007 09:23:18 -0700
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