Description:
This method checks if this abstract pathname is equivalent to the given object. This method returns true if the argument is not null and is an abstract pathname that denotes the same file or directory as this abstract pathname.
Example
File file1 = new File("test/directory");
File file2 = new File("test/directory");
if (file1.equals(file2))
Logger.log("These files are equivalent!");
The example above checks the pathnames of both files for equality.