NSFileManager and making sure you don't overwrite existing files 10.5
NSFileManager and making sure you don't overwrite existing files 10.5
- Subject: NSFileManager and making sure you don't overwrite existing files 10.5
- From: Jonathan Dann <email@hidden>
- Date: Fri, 18 Jan 2008 11:46:30 +0000
The NSFilManager.h file says that the -fileExistsAtPath: method is "of
limited utility... encourages odd behaviour"
If I want to make sure that I'm not overwriting a file that's already
on disk then should I really try loading the file so I get an error if
it's not there?
This seems a little roundabout, are there better ways to check this?
With creating a directory the new method with an error is fine, and it
doesn't overwrite an existing directory, but there doesn't seem to be
an allegory for file creation.
Jonathan
_______________________________________________
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