Re: creating files to write data to?
Re: creating files to write data to?
- Subject: Re: creating files to write data to?
- From: Andy Lee <email@hidden>
- Date: Fri, 15 Aug 2008 18:24:48 -0400
Also:
You should add a check for the return value from your call to -
writeToFile:atomically: (which is deprecated, by the way). The docs
for +fileHandleForWritingAtPath: say it returns nil if the file
doesn't exist (which might be the case if -writeToFile:atomically:
failed), so you should check the return value from that too.
In general, you should check the results of I/O operations, and don't
assume they succeed.
--Andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden