> On Jun 4, 2016, at 9:18 AM, Peter Hudson <peter.hud...@me.com> wrote:
> 
> You're right - I want the behaviour of a package. Do you happen to know how I 
> can achieve it?   I had presumed it might be some mix of flag setting at 
> system level. If for example i set the extension on an NSFileWrapper to   
> .bundle i get some of what I need - but I cant find out how to ‎get an icon 
> of my choosing associated with it. 

It’s part of the document-type declaration in your app’s Info.plist.

I wouldn’t recommend NSFileWrapper for large files, because it reads all of a 
file into memory. The same goes for the usual file-I/O convenience methods on 
NSData, NSString. etc. — for some reason the Foundation APIs have always been 
biased toward reading/writing entire files. This is very convenient, but not 
scaleable.

If your app’s performance is suffering because of large files, then use streams 
instead, and try to only read the part of the file that’s necessary. Or use a 
database like SQLite, which can easily handle terabyte-size files. (If you 
don’t want to deal with SQL queries, there are simpler key/value databases like 
LevelDB, LMDB, Kyoto Cabinet and Berkeley DB.)

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to