Example usage for org.apache.poi.poifs.filesystem EntryUtils areDirectoriesIdentical

List of usage examples for org.apache.poi.poifs.filesystem EntryUtils areDirectoriesIdentical

Introduction

In this page you can find the example usage for org.apache.poi.poifs.filesystem EntryUtils areDirectoriesIdentical.

Prototype

public static boolean areDirectoriesIdentical(DirectoryEntry dirA, DirectoryEntry dirB) 

Source Link

Document

Checks to see if the two Directories hold the same contents.

Usage

From source file:org.alfresco.filesys.repo.CIFSContentComparator.java

License:Open Source License

private boolean isContentIdentical(NPOIFSFileSystem fs1, NPOIFSFileSystem fs2, Collection<String> excludes)
        throws IOException {
    DirectoryEntry de1 = fs1.getRoot();/*from   w  w w .  j  a  va  2s.c o m*/
    DirectoryEntry de2 = fs2.getRoot();

    FilteringDirectoryNode fs1Filtered = new FilteringDirectoryNode(de1, excludes);
    FilteringDirectoryNode fs2Filtered = new FilteringDirectoryNode(de2, excludes);

    boolean retVal = EntryUtils.areDirectoriesIdentical(fs1Filtered, fs2Filtered);
    if (logger.isDebugEnabled()) {
        logger.debug("returning equal=" + retVal);
    }
    return retVal;
}