ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Relative FileSet?
Date Thu, 05 Apr 2001 07:04:07 GMT
Peter Janes <> wrote:

> I'm attempting to implement a wrapper for a tool that needs to
> access the relative pathnames of the files in its FileSet.  For
> example, given:

I this using <apply> in some way? 

<apply> and <execon> both convert the filenames to absolute paths, but
from a coding point of view, DirectoryScanner gives the file names as
relative paths in the first place.

When you look at <copy>, it is doing something like

            File fromDir = fs.getDir(project);
            String[] srcFiles = ds.getIncludedFiles();

and later

            File src = new File(fromDir, srcFiles[i]);

to explicitely get absolute paths. You could simply pass the results
from srcFiles to your command directly and they would be relative to


View raw message