ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject RE: Test if directory is empty
Date Wed, 20 Mar 2002 19:57:16 GMT
--- Dominique Devienne <> wrote:
> Haven't tried it myself, but from the doc I would say that <pathconvert>
> would have converted your fileset the way you wanted. FWIW, --DD

Yep -- <pathconvert> will turn a fileset into a printable list. And you
could use it, in combination with <condition>, to test for an empty
directory -- eg:

  <fileset dir="foodir" id="fs"/>

  <target name="doit" depends="chkdir" unless="noFiles">
    <echo message="files = ${files}"/>

  <target name="chkdir">
    <pathconvert pathsep="," property="files" refid="fs"/>
    <condition property="noFiles">
      <equals arg1="${files}" arg2=""/>



Do You Yahoo!?
Yahoo! Sports - live college hoops coverage

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message