• 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: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ???


  • Subject: Re: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ???
  • From: Peter Lübke <email@hidden>
  • Date: Sun, 27 Mar 2011 12:30:46 +0200


Am 26.03.2011 um 16:41 schrieb Matt Neuburg:

On Fri, 25 Mar 2011 12:08:53 -0700, Laurent Daudelin <email@hidden> said:

I've been trying to copy items from a local disk to an AFP-mounted volume with "copyItemAtPath:toPath:error:" and I found it to be unreliable in the sense that it will fail to set the modification date of the item copied to match that of the original item. It doesn't report any error, just silently continues.


I'm curious as to how performFileOperation:source:destination:files:tag: does with this. But I don't hold out much hope.

Also, cp now handles resource forks okay, and it has a -p option that preserves dates. So that might be another thing to try.

In my own application, which relies on mod dates (it syncs folders), I had so much trouble with all this that in the end I resorted to Apple events telling the Finder to perform the copy - and then more Apple events to fix the mod dates afterwards. In recent versions of the system I've been able to eliminate the mod date fixing part; the Finder now gets this right. Of course this relies on the Finder running.

Still, wasn't the big advertisement for copyItemAtPath supposed to be that it does the same thing the Finder does? So if it fails to do that, that would be a bug.

I don't believe that copyItemAtPath preserves Spotlight Comments, so anyway it does not the *same* thing the Finder does. Or am I wrong on this?


Peter



_______________________________________________

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


  • Follow-Ups:
    • Re: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ???
      • From: Laurent Daudelin <email@hidden>
References: 
 >Re: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ??? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Trouble with NSView resizing
  • Next by Date: Re: Hash Values in Custom Classes
  • Previous by thread: Re: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ???
  • Next by thread: Re: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ???
  • Index(es):
    • Date
    • Thread