• 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
Re: Strange NSFileManager file replacement issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Strange NSFileManager file replacement issue (From: Sixten Otto <email@hidden>)
 >Re: Strange NSFileManager file replacement issue (From: Ken Thomases <email@hidden>)
 >Re: Strange NSFileManager file replacement issue (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Strange NSFileManager file replacement issue
  • Next by Date: Re: NSCache objects not being collected under GC?
  • Previous by thread: Re: Strange NSFileManager file replacement issue
  • Next by thread: Re: Strange NSFileManager file replacement issue
  • Index(es):
    • Date
    • Thread