I want to filter out duplicate files (by their content) in a list of files in Java 8.
eg.
List<File> files = Arrays.asList(new File("a.csv"), new File("b.csv"));
Now let's say that a.csv and b.csv have the same contents. What'd be the best way to retain only the files which have unique content from this list? (eg. either a.csv or b.csv should remain in the list).
We can use file checksums to filter the unique files out. Is there a better way?