Re: Package Bit
Re: Package Bit
- Subject: Re: Package Bit
- From: Ryan Britton <email@hidden>
- Date: Thu, 2 Mar 2006 15:16:37 -0800
If this is a document format you're introducing to the system, I've
done it with the following in my Info.plist. In my case I am making
it a bundle since it has executable code.
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>someExtension</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>AnIcon</string>
<key>CFBundleTypeName</key>
<string>The Bundle Name</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>BNDL</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>com.yourcompany.yourtype</string>
</array>
<key>LSTypeIsPackage</key>
<true/>
</dict>
</array>
On Mar 2, 2006, at 2:54 PM, Jeff Laing wrote:
I've been searching for a while now, and I can't find any
documentation on
how I programmatically create a simple 'file package' with Cocoa.
ie, one of those folders that has the 'package bit' set (or is it the
hasBundle bit?)
When I looked at FSCatalogInfo, I can't see which fields might
contain the
current flags - the finder info is just an anonymous block of
integers.
Does someone have some nice simple, cocoa-callable, example code
that shows
how to create a package?
As an aside, when I tried just creating a normal folder, then using
File
Buddy to set the package bit, and whilst it then works as a package
from
NSWorkspace's perspective, it still has the disclosure triangle in the
finders list view, rather than requiring 'Show Package Contents' to
peek
inside. So perhaps there's more to it?
Note, I do *not* want a bundle here, I'm wanting to do something
similar to
'.rtfd'
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Package Bit (From: Jeff Laing <email@hidden>) |