You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by João Augusto Charnet <jo...@sfw.com.br> on 2005/09/30 21:36:34 UTC

Check directory exists

Hello.
Is is possible to check if a given directory exists through ant?
I have a task that compiles some java files, and I'd like to check if 
the directory passed to the javac exists before running javac.
Any ideas ?

Thanks a lot.
John
-- 

<http://www.sfw.com.br>Softway & Softcomex

	

Jo�o Augusto Charnet
Computer Engineer - R&D Team

Phone/Fax: 55 19 3739-9261
E-mail: joao.charnet@sfw.com.br <ma...@sfw.com.br>
R. Conceicao, 233 - Cj, 609 - Centro
13010-050 - Campinas - SP - Brazil


Re: Check directory exists

Posted by Petar Tahchiev <pa...@gmail.com>.
On 03/10/05, Ninju Bohra <ni...@yahoo.com> wrote:
>
> Or you can use the <available> task (with the "type"
> attribute equal to "dir") if just need to know whether
> the directory is already there :-)
>
> --- Jeffrey E Care <ca...@us.ibm.com> wrote:
>
> > just run <mkdir>; it won't post an error if the
> > directory already exists
> >
> > --
> > Jeffrey E. Care (carej@us.ibm.com)
> > WebSphere v7 Release Engineer
> > WebSphere Build Tooling Lead (Project Mantis)
> >
> >
> >
> >
> > João Augusto Charnet <jo...@sfw.com.br>
> > 09/30/2005 06:36 PM
> > Please respond to
> > "Ant Users List"
> >
> >
> > To
> > Ant Users List <us...@ant.apache.org>
> > cc
> >
> > Subject
> > Check directory exists
> >
> >
> >
> >
> >
> >
> > Hello.
> > Is is possible to check if a given directory exists
> > through ant?
> > I have a task that compiles some java files, and I'd
> > like to check if the
> > directory passed to the javac exists before running
> > javac.
> > Any ideas ?
> >
> > Thanks a lot.
> > John
> > --
> > Softway & Softcomex
> > João Augusto Charnet
> > Computer Engineer - R&D Team
> >
> > Phone/Fax: 55 19 3739-9261
> > E-mail: joao.charnet@sfw.com.br
> > R. Conceicao, 233 - Cj, 609 - Centro
> > 13010-050 - Campinas - SP - Brazil
> >
> >
>
>
>
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
> Or try to set the directory as a property and then call the target that
compiles the source-code with the if="${property}" option.


--
Regards, Petar!

Re: Check directory exists

Posted by Ninju Bohra <ni...@yahoo.com>.
Or you can use the <available> task (with the "type"
attribute equal to "dir") if just need to know whether
the directory is already there :-)

--- Jeffrey E Care <ca...@us.ibm.com> wrote:

> just run <mkdir>; it won't post an error if the
> directory already exists
> 
> -- 
> Jeffrey E. Care (carej@us.ibm.com)
> WebSphere v7 Release Engineer
> WebSphere Build Tooling Lead (Project Mantis)
> 
> 
> 
> 
> João Augusto Charnet <jo...@sfw.com.br> 
> 09/30/2005 06:36 PM
> Please respond to
> "Ant Users List"
> 
> 
> To
> Ant Users List <us...@ant.apache.org>
> cc
> 
> Subject
> Check directory exists
> 
> 
> 
> 
> 
> 
> Hello.
> Is is possible to check if a given directory exists
> through ant?
> I have a task that compiles some java files, and I'd
> like to check if the 
> directory passed to the javac exists before running
> javac.
> Any ideas ?
> 
> Thanks a lot.
> John
> -- 
> Softway & Softcomex 
> João Augusto Charnet
> Computer Engineer - R&D Team
> 
> Phone/Fax: 55 19 3739-9261
> E-mail: joao.charnet@sfw.com.br 
> R. Conceicao, 233 - Cj, 609 - Centro
> 13010-050 - Campinas - SP - Brazil
> 
> 






		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Check directory exists

Posted by Jeffrey E Care <ca...@us.ibm.com>.
just run <mkdir>; it won't post an error if the directory already exists

-- 
Jeffrey E. Care (carej@us.ibm.com)
WebSphere v7 Release Engineer
WebSphere Build Tooling Lead (Project Mantis)




João Augusto Charnet <jo...@sfw.com.br> 
09/30/2005 06:36 PM
Please respond to
"Ant Users List"


To
Ant Users List <us...@ant.apache.org>
cc

Subject
Check directory exists






Hello.
Is is possible to check if a given directory exists through ant?
I have a task that compiles some java files, and I'd like to check if the 
directory passed to the javac exists before running javac.
Any ideas ?

Thanks a lot.
John
-- 
Softway & Softcomex 
João Augusto Charnet
Computer Engineer - R&D Team

Phone/Fax: 55 19 3739-9261
E-mail: joao.charnet@sfw.com.br 
R. Conceicao, 233 - Cj, 609 - Centro
13010-050 - Campinas - SP - Brazil