From: Andrew Johnson Date: 2004-12-20T01:52:11+09:00 Subject: Re: FileUtils.cp_r - how to prune On Sun, 19 Dec 2004 04:35:26 GMT, itsme213 wrote: > Thanks, I'll keep that as a backup. But I should have been more explicit ... > >> > I am doing >> > FileUtils.cp_r( "source/.", "generated") >> > to copy a directory tree. >> > >> > How can I prune out any sub_tree with /.svn/ ? > > How can I prune out any sub_tree with /.svn/ in its path from even being > copied over in the first place? The easiest way is probably just to modify FileUtils.cp_r() to add an ":ignore => %r{}" option (and adjust fu_copy_dir() accordingly). A quick glance looks like only a handful of lines would be affected/added. andrew -- Andrew L. Johnson http://www.siaris.net/ It's kinda hard trying to remember Perl syntax *and* Occam's razor at the same time :-) -- Graham Patterson