You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Antoine Levy-Lambert <le...@tiscali-dsl.de> on 2003/05/27 12:08:09 UTC
proposed extension of pathconvert to be able to pull the directories from filesets
I would like to find a way to test the contents of a fileset which has nested selectors in it, without for instance invoking the copy task on it.
I thought of using <pathconvert> to convert the filesets into properties. The problem there is that <pathconvert> only expands the files contained in a fileset, not the directories. The code of the <path> datatype only pulls the files contained in a fileset, and this should not be changed without adding new attributes somewhere.
To get the whole fileset with directories, would it be thinkable to do the following :
<pathconvert property="fileset.expanded" targetos="unix">
<pathelement includedirs="true">
<fileset dir="somedir">
<type type="dir"/>
</fileset>
</pathelement>
</pathconvert>
This would be putting into the property "fileset.expanded" all directories under "somedir".
Would such a syntax be OK ?
Antoine
Re: proposed extension of pathconvert to be able to pull the directories from filesets
Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 27 May 2003, Antoine Levy-Lambert <le...@tiscali-dsl.de>
wrote:
> I can leave <path/> and <pathelement/> as they are, and do my tests
> by calling FileScanner#getIncludedFiles() and
> FileScanner#getIncludedDirectories() in my test cases. This might be
> the simplest thing to do.
I agree.
Stefan
Re: proposed extension of pathconvert to be able to pull the directories from filesets
Posted by Antoine Levy-Lambert <le...@tiscali-dsl.de>.
No, it is not possible to do what I want using dirsets instead, because I
want to implement that to be able to test filesets with selectors in them,
including the directories that they contain.
I can leave <path/> and <pathelement/> as they are, and do my tests by
calling FileScanner#getIncludedFiles() and
FileScanner#getIncludedDirectories() in my test cases. This might be the
simplest thing to do.
Antoine
----- Original Message -----
From: "Stefan Bodewig" <bo...@apache.org>
To: <de...@ant.apache.org>
Sent: Tuesday, May 27, 2003 12:33 PM
Subject: Re: proposed extension of pathconvert to be able to pull the
directories from filesets
> On Tue, 27 May 2003, Antoine Levy-Lambert <le...@tiscali-dsl.de>
> wrote:
>
> > The code of the <path> datatype only pulls the files contained in a
> > fileset,
>
> Yes, and the directories from dirsets.
>
> > <pathconvert property="fileset.expanded" targetos="unix">
> > <pathelement includedirs="true">
> > <fileset dir="somedir">
> > <type type="dir"/>
> > </fileset>
> > </pathelement>
> > </pathconvert>
>
> would add yet another special case (see <apply>'s type attribute).
>
> Is it possible to do what you want by using dirsets instead?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
Re: proposed extension of pathconvert to be able to pull the directories from filesets
Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 27 May 2003, Antoine Levy-Lambert <le...@tiscali-dsl.de>
wrote:
> The code of the <path> datatype only pulls the files contained in a
> fileset,
Yes, and the directories from dirsets.
> <pathconvert property="fileset.expanded" targetos="unix">
> <pathelement includedirs="true">
> <fileset dir="somedir">
> <type type="dir"/>
> </fileset>
> </pathelement>
> </pathconvert>
would add yet another special case (see <apply>'s type attribute).
Is it possible to do what you want by using dirsets instead?
Stefan