How do I check for the existence of a folder using Ant?
We can check the existence of a file, but can we do the same for a folder as well?
Here's a small example incorporating the available element into an if test.
Warning: you need ant-contrib.jar in your ANT_HOME\lib directory otherwise you won't have access to the if elements, and your script will fail with this error:
Problem: failed to create task or type if
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.