On 19 maj 2011, at 16.48, Quincey Morris 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];
Or: [[NSFileManager defaultManager] createFileAtPath: path contents: nil attributes: nil]; ...but yeah, it doesn't take an URL, and it doesn't return an error on failure. Good topic for an enhancement request on Foundation IMO. j o a r _______________________________________________ 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