Class FilesMatch
java.lang.Object
org.apache.tools.ant.taskdefs.condition.FilesMatch
- All Implemented Interfaces:
Condition
public class FilesMatch extends java.lang.Object implements Condition
Compares two files for equality based on size and
content. Timestamps are not at all looked at.
- Since:
- Ant 1.5
-
Constructor Summary
Constructors Constructor Description FilesMatch() -
Method Summary
Modifier and Type Method Description booleaneval()comparison method of the interfacevoidsetFile1(java.io.File file1)Sets the File1 attributevoidsetFile2(java.io.File file2)Sets the File2 attributevoidsetTextfile(boolean textfile)Set whether to ignore line endings when comparing files.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FilesMatch
public FilesMatch()
-
-
Method Details
-
setFile1
public void setFile1(java.io.File file1)Sets the File1 attribute- Parameters:
file1- The new File1 value
-
setFile2
public void setFile2(java.io.File file2)Sets the File2 attribute- Parameters:
file2- The new File2 value
-
setTextfile
public void setTextfile(boolean textfile)Set whether to ignore line endings when comparing files.- Parameters:
textfile- whether to ignore line endings.
-
eval
comparison method of the interface- Specified by:
evalin interfaceCondition- Returns:
- true if the files are equal
- Throws:
BuildException- if it all went pear-shaped
-