Example usage for org.apache.poi.poifs.filesystem FilteringDirectoryNode FilteringDirectoryNode

List of usage examples for org.apache.poi.poifs.filesystem FilteringDirectoryNode FilteringDirectoryNode

Introduction

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

Prototype

public FilteringDirectoryNode(DirectoryEntry directory, Collection<String> excludes) 

Source Link

Document

Creates a filter round the specified directory, which will exclude entries such as "MyNode" and "MyDir/IgnoreNode".

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();/*w ww.j  a v  a2  s .  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;
}