Re: My little file copy/backup program
Re: My little file copy/backup program
- Subject: Re: My little file copy/backup program
- From: Scott Ellsworth <email@hidden>
- Date: Wed, 22 Mar 2006 09:36:22 -0800
On Mar 22, 2006, at 8:59 AM, Ondra Cada wrote:
Bobby,
On 22.3.2006, at 17:16, Bobby B wrote:
I'm posting this cause maybe there is one person out there who knows
less Cocoa than I, so it may help them :) If anyone has comments on
why I'm doing something stupidily, please say!
Well if you insist... having just a moment now, why not :)
First, of course, it's pretty disputable whether it makes sense at
all to program something like this for a system where rsync is
available and NSTask has a nice API. Depends: for a real app
probably not, but great for learning :)
Beware, though, that the system supplied rsync has a bug that is a
deal killer for most file copying programs.
If you supply the --extended-attributes and the --archive flag, it
uses the present time for the modified time on the destination file,
rather than the source file modified time. Without --extended-
attributes, it works correctly as documented.
Thus, you are going to have to use your own rsync anyway, which may
mean digging into what it is doing enough to make your own, more
special purpose, algorithm a reasonable option.
(Some afternoon I must look into that code. It has all the feel of a
pair of calls out of order; it does the right thing with each option
separately. All the hard work has already been done.)
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden