ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Oltmans" <joltm...@bolosystems.com>
Subject Get copied fileset
Date Fri, 23 Feb 2007 21:06:29 GMT
Is there any way to create a fileset from the copy task that lists the
files that were copied into the todir?

 

Here's the code snippet:

------------------------------------------------------------------------
----------------------

            <fileset id="new.files"

                     dir="${tempdir}">

                <exclude name="**/.svn/**"/>

                <present present="srconly"

                         targetdir="${repos-files}"/>

            </fileset>

 

            <!--Copy new files into the repository's directory-->

            <copy todir="${repos-files}"

                  verbose="true"

                  includeEmptyDirs="true"

                  preservelastmodified="true">

                <fileset refid="new.files"/>

            </copy>

------------------------------------------------------------------------
----------------------

Is there any way I can get a list that has the new.files that were
copied to repos-files with their full new path?

For example if I had two directories as follows and my fileset from
above captured all the files in dir1 and copied them to dir2. 

Before copy:

/home/user/project/dir1/

            file1

            file2

            file3

/home/user/project/dir2/

            file4

            file5

After copy:

/home/user/project/dir1/

            file1

            file2

            file3

/home/user/project/dir2/

            file1

            file2

            file3

            file4

            file5

new.files would contain the following:

/home/user/project/dir1/file1

/home/user/project/dir1/file2

/home/user/project/dir1/file3

 

But I'd LIKE to get a new fileset that contains the following:

/home/user/project/dir2/file1

/home/user/project/dir2/file2

/home/user/project/dir2/file3

 

This would help because I could then perform other actions on the copied
files (specifically a svn add command) but I have no idea how to get
this second fileset without using java. Is this something mappings could
help with?

 

James Oltmans
Software Engineer
Bolo Systems, Inc. 
joltmans@bolosystems.com

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message