From: Corey Jewett Date: 2007-09-01T08:36:19+09:00 Subject: Re: rsync functionality in Ruby? >> On Aug 31, 12:49 pm, Paul van Delst wrote: >>> Hello, >>> >>> I wrote a ruby script to allow me to automatically update a >>> repository working copy from >>> an unversioned hierarchy. I use rsync to synchronise the >>> directories prior to svn >>> add/delete and commit. Worked great on my test system (linux). >>> However, because of >>> security issues, on the system where this script will be used >>> there is no rsync utility >>> available. >>> >>> So, I was wondering, is there an existing rsync-like ruby >>> solution? I checked this >>> newsgroup, rubyforge, raa, etc but couldn't find anything that >>> replicated rsync >>> functionality (lots of utilities that use/manage rsync though.) You should look at FileUtils::cp_r with the :preserve option. It's not the same as rsync by any stretch, but it should be fairly similar assuming you didn't need --delete or --include/--exclude patterns. If you do need those, then the source of FileUtils is probably a pretty good place to start rolling your own since it properly does symlinks, permissions, times, and other metadata. Corey