I am writing a build script in Phing and want to have an if statement which tests for the existence of any files with a given extension in a directory (.sql files in this case). I have tried to do this with <available>
as shown below, with no luck (the <then>
never gets executed. Anyone have any ideas?
<if>
<available file="${build.pendingsql}/*" type="file" extension="sql" />
<then>
<!-- Do stuff -->
</then>
</if>