On May 19, 2011, at 21:50 , Quincey Morris wrote: > On May 19, 2011, at 21:46, Rick Mann wrote: > >> >> On May 19, 2011, at 16:48 , Quincey Morris wrote: >> >>> On May 19, 2011, at 11:55, Rick Mann wrote: >>> >>>> It seems Cocoa is lacking in file-creation APIs (none URL-based, none >>>> return an error object). >>> >>> How about: >>> >>> [[NSData data] writeToURL: myURL options: 0 error: &error]; >> >> That requires that I build the content in memory first. I wanted to write it >> as I built it. > > You didn't look carefully enough. What is [[NSData data] length]?
Indeed I didn't. But frankly, that's a kludge. Cocoa is full of inconsistencies (like NSFileManager/NSFileHandle lacking modern file creation methods) forcing the (ab)use of another API. Sure, it works (I'm guessing), but it's ugly. -- Rick _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com