• 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
NSData writeToFile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSData writeToFile


  • Subject: NSData writeToFile
  • From: Chuck Soper <email@hidden>
  • Date: Thu, 23 Dec 2004 15:38:32 -0800

Hello,

I'm using this NSData's method:
  - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)flag
to write some data to a file on disk. It works great.

If a file with the same name already exists, writeToFile: just replaces it. Is this expected behavior? Is this approach okay? Do you think that it could break in the future?

Should I see if the file exists and delete if it does with these FileManager methods?
- (BOOL)fileExistsAtPath:(NSString *)path
- (BOOL)removeFileAtPath:(NSString *)path handler:(id)handler


Chuck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Bundling Framework Problem
  • Next by Date: Re: "Can't create new document" alert unwanted
  • Previous by thread: Re: checking the status of a website from an application
  • Next by thread: Re: NSData writeToFile
  • Index(es):
    • Date
    • Thread