Class ResourceExists

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.taskdefs.condition.ResourceExists
All Implemented Interfaces:
Cloneable, Condition

public class ResourceExists extends ProjectComponent implements Condition
Condition that checks whether a given resource exists.
Since:
Ant 1.8.0
  • Constructor Details

    • ResourceExists

      public ResourceExists()
  • Method Details

    • add

      public void add(Resource r)
      The resource to test.
      Parameters:
      r - Resource
    • validate

      protected void validate() throws BuildException
      Argument validation.
      Throws:
      BuildException
    • eval

      public boolean eval() throws BuildException
      Description copied from interface: Condition
      Is this condition true?
      Specified by:
      eval in interface Condition
      Returns:
      true if the condition is true
      Throws:
      BuildException - if an error occurs