Given a Phing loop such as this
<target name="lessc">
<exec command="lessc ${absolute-filename}" logoutput="false" output="${project.basedir}/public/assets/css/libraries/${filename}" />
</target>
<target name="build-in-loop">
<foreach param="filename" absparam="absolute-filename" target="lessc">
<fileset dir="${project.basedir}/assets/less/libraries/">
<include name="*.less"/>
</fileset>
</foreach>
</target>
In target lessc, how can I extract the file name without extension from the variable absolute-filename
? In the example above, the output
file will have the extension .less
- obviously not what I need.
I know there is a task made for less, and that I could extend Phing to support this specific operation, but I would like to know first if Phing basically allows simple string manipulation on variables.