You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Diane Holt <ho...@yahoo.com> on 2000/09/19 00:25:32 UTC

Copying file lists

I have >2000 files I need to copy. If I do them all as <copyfile>'s, it
takes 12 seconds, which is great -- but, I have to house each file in a
<copyfile> task, and include the fullpath filename of what it should be
copied to, which ends up making for a very large and hard to read
build-file, and which I'm sure would be a maintenance nightmare.

What I'd prefer is to just have a simple list of files (in a text file) to
be copied, given as relative-path names, and copied to the outdir with the
subdir structure maintained automagically.

Enter <copydir>, right? :)  Except that, if I give <copydir> that list of
files as <include>'s, it takes 2 minutes to do, instead of 12 seconds (I'm
assuming that's due to the directory scanning it does), and it still makes
for a pretty cumbersome build-file. If I do the <copydir> with wild-carded
inclusions and exclusions, the time does come down by almost half -- but
that method just isn't a safe enough way to go, since you'd undoubtedly
end up with all kinds of foofile's in your build tree (I certainly did
when I tried it -- there in my out dir were all the little files I've been
creating while trying to work this out :), so that's just really not an
option. If I put limits on the wild-carding to only certain suffixes, it
drives the time back up and then some (and it still just really isn't safe
enough for me to do it that way).

So, what I really need is for either <copyfile> to accept a list of files
and maintain whatever subdir structure they have -- or, I would need a way
to tell <copydir> "Don't the scan directories, just pick up the files in
the list" (maybe scandir="false" ?).

Any chance of something like happening?

Thanks!
Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Re: Copying file lists

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "DH" == Diane Holt <ho...@yahoo.com> writes:

 DH> Enter <copydir>, right? :) Except that, if I give <copydir> that
 DH> list of files as <include>'s, [...] it still makes for a pretty
 DH> cumbersome build-file.

You know <copydir> has an includesfile attribute?

 DH> -- or, I would need a way to tell <copydir> "Don't the scan
 DH> directories, just pick up the files in the list" (maybe
 DH> scandir="false" ?).

You mean something like "my list holds no patterns so don't bother
with matching, trust me"? Is this a common case (I know you need it)?

Stefan