----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 29, 2003 7:14 AM Subject: RE: Antwort: AW: Check whether a fileset exist
Why do you want to check? Simply declare it on the beginning of the buildfile and use that where you want. The _content_ of that fileset is evaluated when it´s used, not when it´s declared. Jan > I really want to test if a fileset has been created or not. I > tried it with > <pathconvert> but it fails if the fileset doesn't exist. If > the fileset > doesn't exist the property shouldn't created. > > <pathconvert refid="contrib.fs" targetos="unix" property="my.fileset" > setOnEmpty="false" /> > > Cheers > Oliver > > ----------------------------------- > > I guess you mean you want to check whether a fileset contains > at least one > file. You can do this by using <pathconvert/> to transform create a > property > containing the files present in your fileset. Then you can use the > <condition/> task to compare the property obtained with the > empty string. > Look at the condition task docu in the manual. > > <project name="pathconvert"> > <fileset dir="c:/dev/asf/ant" id="myfileset"> > <include name="**/*.xyz"/> > </fileset> > <pathconvert refid="myfileset" targetos="unix" property="my.fileset"/> > <echo message="my.fileset is ${my.fileset}"/> > </project> > > Cheers, > > Antoine > > -----Ursprüngliche Nachricht----- > Von: Oliver Wulff [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 25. September 2003 21:04 > An: [EMAIL PROTECTED] > Betreff: Check whether a fileset exist > > Hi > > Can I check whether a fileset exist? > > Oliver > > > > > > > > ******************* BITTE BEACHTEN ******************* > Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet > möglicherweise vertrauliche oder gesetzlich geschützte Daten oder > Informationen. Zum Empfang derselben ist (sind) ausschliesslich die > genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht > irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter > Ausschluss jeder Reproduktion zu zerstören und die absendende Person > umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]