Ah! Thanks alot. I wasn't aware of <available> task at all! Maybe will be nice to add seealso to if/ifnot documentation to all tasks which could be used with (e.g. they set property values).
Still - it could be useful to have some (e.g. system.result) property which contains result of previous task. Success/skipped/error (if failonerror is false). For example you never know after execution of <mkdir> whether directory exists before or was just created. You don't know after <csc> task what files which actually compiled and which not, etc. Once more: Thanks alot! Martin ----- Original Message ----- From: "Gert Driesen" <[EMAIL PROTECTED]> To: "Martin Aliger" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, September 05, 2003 11:54 AM Subject: Re: branching in nant > Hi Martin, > > You can use something like this : > > <available type="Directory" resource="${log4net.basedir}" > property="temp.log4net.assembly.available" /> > <if propertytrue="temp.log4net.assembly.available"> > .... > </if> > > Hope this helps. > > Gert > ----- Original Message ----- > From: "Martin Aliger" <[EMAIL PROTECTED]> > To: "Gert Driesen" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Friday, September 05, 2003 11:20 AM > Subject: Fwd: branching in nant > > > > > > Hi all, > > > > > > > > I want to check whether directory exists and branch by the result. Is > it > > > > possible in current NAnt? > > > > > > [snip] > > > > When I first come to NAnt I was really shocked you couldn't check > result > > > > code of previous task. Except of failonerror="true" of course. This is > > > > enough in most cases but sometimes you want to check for error and > make > > > > some other action if failed. > > > > > Hi Martin, > > > > > > You can always use a combination of the available task and the if task. > > > > > > Gert > > > > How to do it? I look into IfTask sources but see no mechanism to it > there... > > :-( > > > > Regards, > > Martin > > > > > > > > > > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users