I am trying to compare two txt files using Apache Commons FileUtil tool. Here's my code:
if (entity.isDirectory()){
File[] listOfFiles = entity.listFiles();
for (File file : listOfFiles){
try {
if(FileUtils.contentEqualsIgnoreEOL(new File(outputFolder+id+"\\"+file.getName().toString()),
new File(referenceFolderSolution+file.getName().toString()), null)){
System.out.println("content equal!!!");
}
These two files exist in different folders as shown above, but their contents are equal. But still I am not getting the output as content equal!!!
.
Any help will be appreciated!