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 16:34:23 -0500
On Aug 19, 2011, at 10:29 AM, Sixten Otto wrote:
> This morning, I replaced the code between the "*** 1" and "*** 2" with
> the following, which still failed in exactly the same way. It does get
> create a replacement directory and return it, my temp file moves into
> that directory without issue, but the swap still mysteriously fails.
I realize this is getting further and further from what you actually want, but you might try using the exchangedata() or FSExchangeObjects() functions directly. At least that way, you should receive a clearer error result. For the latter, you can get FSRefs from NSURLs via CFURLGetFSRef(), since NSURL and CFURLRef are toll-free bridged.
The ability to exchange objects has to be supported by the file system. Maybe the file system on an iOS device simply doesn't support it. The errors you get back from the above functions ought to make that clear.
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