Solved

ANT- checking for the existence of files

Posted on 2006-06-21
5
198 Views
Last Modified: 2010-03-31

Hey there,

I'm currently converting some existing build functionality to use ANT.  All is good, except that in the original, the build contained some validation checks, things like lookinf for the existance of directories, and files within.

I'm wanting to know if I can use an ANT Task to examine a give dir, recursively, testing for emptiness, ceratin fields etc.

any suggestions?

thanks

0
Comment
Question by:RichardStarkey
  • 2
  • 2
5 Comments
 
LVL 92

Expert Comment

by:objects
ID: 16957423
0
 

Author Comment

by:RichardStarkey
ID: 16957580
thanks objects,

but I still can't see how I can check if a dir is empty?

thanks
0
 
LVL 92

Assisted Solution

by:objects
objects earned 125 total points
ID: 16957615
you should be able to achive that with isfileselected and the depth selector

http://ant.apache.org/manual/CoreTypes/selectors.html
0
 
LVL 35

Accepted Solution

by:
girionis earned 125 total points
ID: 16957620
0
 
LVL 35

Expert Comment

by:girionis
ID: 16957632
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maven project error 5 48
eclipse argument 14 53
replace a word with other 1 40
object oriented programming comparison 5 54
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now