src/main/java/org/codehaus/plexus/archiver/util/ResourceUtils.java
public static boolean isCanonicalizedSame( PlexusIoResource resource, File file )
        throws IOException
    {
        if ( resource instanceof FileSupplier)
        {
            File resourceFile = ((FileSupplier) resource).getFile();
            return file.getCanonicalFile().equals( resourceFile.getCanonicalFile() );
        }
        return false;
    }
public static boolean isCanonicalizedSame( PlexusIoResource resource, File file )
        throws IOException
    {
        if ( resource instanceof FileSupplier)
        {
            File resourceFile = ((FileSupplier) resource).getFile();
            return file.getCanonicalFile().equals( resourceFile.getCanonicalFile() );
        }
        return false;
    }
Checks, whether the resource and the file are identical.
Uses {@link File#getCanonicalFile()} for comparison, which is much
slower than comparing the files.