Hi,
I'm writing an Ant task that used a nested fileset. My problem is that when
I use the following code to list the files that have been specified by the
<fileset> tags, all diretories are written using a "\" (that's normal I
guess becuase I am on a win 2000 system). However I need to pass this list
of files to a 'cvs' command, and the cvs server is on a unix system. How can
I convert the filepath to a unix style (with "/" instead of "\") ?
Here is my code :
Enumeration e = m_Filesets.elements();
while(e.hasMoreElements()) {
FileSet fs = (FileSet)e.nextElement();
DirectoryScanner ds = fs.getDirectoryScanner(project);
String[] srcFiles = ds.getIncludedFiles();
for (int i = 0; i < srcFiles.length; i++) {
toExecute.createArgument().setValue(srcFiles[i]); // I
need "/" here instead of "\" in the directory names ...
}
}
Thanks a lot
Vincent.