Re: Creating/saving/appending to files the Cocoa way
Re: Creating/saving/appending to files the Cocoa way
- Subject: Re: Creating/saving/appending to files the Cocoa way
- From: Matt Neuburg <email@hidden>
- Date: Mon, 18 Jan 2010 12:36:39 -0800
- Thread-topic: Creating/saving/appending to files the Cocoa way
>
> So another question on this...looking at NSFileHandle, it doesn't look like
> there's a good way to say "set the file pointer to <location> and start
> writing *there*" other than slurping up the existing contents of the file,
> re-writing them back, then adding in the new data.
>
> Is this a correct reading of the docs?
It is not. Had it been, I would not have recommended NSFileHandle as "the
Cocoa way" to append. Simply use the seek... commands to position the file
pointer. No slurping occurs. m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden