From 52f34ecb83e9735b6743defc458c948624efc407 Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
Date: Sat, 22 Aug 2009 05:56:29 +0000
Subject: [PATCH] resourceexists condition
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@806790 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 2 +
docs/manual/CoreTasks/conditions.html | 15 +++++
.../taskdefs/condition/ResourceExists.java | 56 +++++++++++++++++++
.../tools/ant/types/conditions/antlib.xml | 2 +
.../condition/resourceexists-test.xml | 39 +++++++++++++
5 files changed, 114 insertions(+)
create mode 100644 src/main/org/apache/tools/ant/taskdefs/condition/ResourceExists.java
create mode 100644 src/tests/antunit/taskdefs/condition/resourceexists-test.xml
diff --git a/WHATSNEW b/WHATSNEW
index 2461c218c..10b2135b0 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -875,6 +875,8 @@ Other changes:
* The resource collection can now optionally cache its
contents.
+ * A new condition can check whether resources exists.
+
Changes from Ant 1.7.0 TO Ant 1.7.1
=============================================
diff --git a/docs/manual/CoreTasks/conditions.html b/docs/manual/CoreTasks/conditions.html
index e0ad40caf..c09396949 100644
--- a/docs/manual/CoreTasks/conditions.html
+++ b/docs/manual/CoreTasks/conditions.html
@@ -1057,5 +1057,20 @@ is redundant and will be ignored.
<file file="${file}"/>
</islastmodified>
+
+resourceexists
+
+Tests a resource for existance. since Ant 1.8.0
+
+The actual resource to test is specified as a nested element.
+
+
+ An example:
+
+
+<resourceexists>
+ <file file="${file}"/>
+</resourceexists>
+