As far as I know there is no standard API for this as there is no standard way to define "different". Consider 2 files.

File 1

aaa
bbb
ccc
ddd

File 2