Re: Strange NSFileManager file replacement issue
Re: Strange NSFileManager file replacement issue
- Subject: Re: Strange NSFileManager file replacement issue
- From: Ken Thomases <email@hidden>
- Date: Fri, 19 Aug 2011 01:16:15 -0500
On Aug 19, 2011, at 12:43 AM, Ken Thomases wrote:
> On Aug 19, 2011, at 12:38 AM, Ken Thomases wrote:
>
>> Although it is easy to interpret "a temporary directory as provided by the OS" being compatible with NSTemporaryDirectory(), I suspect it really means a directory returned by -URLForDirectory:inDomain:appropriateForURL:create:error: with NSItemReplacementDirectory passed for the directory and your ultimate destination URL passed for the "url" parameter.
>
> Hmm. Didn't follow the link to StackOverflow early enough. Post there claims it was tried and didn't help.
Sorry to reply to myself twice, but the StackOverflow post passed NO for the shouldCreate parameter of -URLForDirectory:... It's worth trying with YES.
The other thing to try is the suggestion from the -replaceItemAtURL: docs for newItemURL. Use "a uniquely named directory placed in the same directory as the original item if the temporary directory is not available".
Regards,
Ken
_______________________________________________
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