>1. I miss the source folder. As an example task:
><copy todir="C:\A">
><fileset dir="C:\B" includes="*.JPG" />
><mapper... />
></copy>
>Here, the variable "source" would be something matched by 
>*.JPG. It does not include the folder C:\B.


mmmh ... that works for me:

<project>
    <pathconvert property="p">
        <fileset id="fs" dir="." includes="**/*.jpg"/>
        <scriptmapper id="mapper" language="javascript">
            f = new java.io.File(source);
            project.log(
                ((f.exists()) ? "+ " : "- ")
                + source
            );
        </scriptmapper>
    </pathconvert>
</project>

 
>2. There might be previous mappers that changed the filename.
>
>My question was more to know if there was anyway to access the 
>source File object *directly* from a mapper.
>Something like
>public File getSourceFile();
>would be perfect ;)

I dont think there is something like that. But you'll find it in the
source code if there is one ;-)

Think of composite mappers - what should arrive? Especially if the
earlier mapper has assigned
multiple targets for one source file? Especially if the result comes
from a filtermapper?


Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to