show example of equivalent EntryUtils.copyNodes using FilteringDirectoryNode instead of DirectoryNode with excepts list

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1767715 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2016-11-02 16:22:04 +00:00
parent 9d3094f11f
commit 6966eebb38

View File

@ -105,15 +105,9 @@ public class EntryUtils
DirectoryEntry targetRoot, List<String> excepts )
throws IOException
{
Iterator<Entry> entries = sourceRoot.getEntries();
while ( entries.hasNext() )
{
Entry entry = entries.next();
if ( !excepts.contains( entry.getName() ) )
{
copyNodeRecursively( entry, targetRoot );
}
}
FilteringDirectoryNode source = new FilteringDirectoryNode(sourceRoot, excepts);
FilteringDirectoryNode target = new FilteringDirectoryNode(targetRoot, excepts);
copyNodes( source, target );
}
/**