• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: creating files to write data to?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: creating files to write data to? (From: FTB Accounts <email@hidden>)

  • Prev by Date: Re: creating files to write data to?
  • Next by Date: Re: Window 'close' action fails
  • Previous by thread: Re: creating files to write data to?
  • Next by thread: Re: creating files to write data to?
  • Index(es):
    • Date
    • Thread