Re: Problem with NSFileManager
Re: Problem with NSFileManager
- Subject: Re: Problem with NSFileManager
- From: Jens Alfke <email@hidden>
- Date: Wed, 2 Sep 2009 12:33:46 -0700
On Sep 2, 2009, at 11:50 AM, K. Chen wrote: Then my code tries to copy the file over from the bundle; note the the destination is under <app_home>/Documents. if (![fileManager copyItemAtPath:configFilePath toPath:myConfigDir error:&err]) Here I got the error message from [NSError localizedDescription] saying: Operation could not be completed. File exists.
You were checking the existence of 'myConfigFile'. But here the destination is 'myConfigDir'; that directory exists. You have to specify the full path of the destination, including the filename. It's not like the 'cp' command.
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden