Solved

ANT- checking for the existence of files

Posted on 2006-06-21
5
197 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video teaches viewers about errors in exception handling.

707 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