ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Solofnenko <>
Subject RE: Maybe <present> should work with another file set.
Date Fri, 07 Jun 2002 20:05:22 GMT
Sorry, I was mistaken about default behaviour.

I am preparing a image directory by copying files from several folders.
After that I want to delete obsolete files (instead of deleting the whole
directory at the beginning). The code is something like:

<copy todir="${image}">
  <fileset .../>
  <fileset dir="${image}">
    <present targetdir="${src_dir} present="srconly"/>

However source fileset can be quite complex. Do you think this feature
should be added into ANT?

- Alexey.

{   } Alexey N. Solofnenko
{ } Inventigo LLC
Pleasant Hill, CA (GMT-8 usually)

-----Original Message-----
From: Bruce Atherton []
Sent: Friday, June 07, 2002 12:58 PM
To: Ant Developers List
Subject: Re: Maybe <present> should work with another file set.

At 03:16 PM 6/6/2002 -0700, Alexey Solofnenko wrote:

>   besides the fact that <present> by default works like <not-present>, it
>would be great to make it work with another fileset. In some situations
>(like syncing a directory with some files from some directories) it would

Colour me confused. I don't understand what you are seeing in default 
behaviour, and I don't understand why you need another fileset.

Given this scenario:



then this snippet:

     <fileset dir="src" includes="**/*.txt">
       <present targetdir="/test"/>

results in one file selected, file1.txt. The default behaviour is "present" 
rather than the negation. If you are seeing something else, then that is a 
bug and it would be helpful if you could provide details. Note that even 
with the negation you would get only one file, but in this case it would be 

Any inclusion, exclusion, and selection criteria you need are provided by 
the source fileset, since it controls what files the present selector is 
applied to. What usecase would see you needing to put separate exclusions 
on the targets? What would it gain you that you don't get by applying the 
exclusions to the source fileset?

If you can provide usecases that aren't handled another way then we can 
talk about it, but right now I don't see the need for the added complexity.

Of course, you could always write your own custom 
"present-in-another-fileset" selector too. Perhaps one that took a fileset 

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message