From 0a7a3c36bf34490b90ebc7c832c9af2efc1baa8f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 9 Apr 2015 18:47:14 +0000 Subject: [PATCH] * experiment with data structures for keeping/checking file trees in memory --- source/net/filebot/util/FileSet.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/net/filebot/util/FileSet.java b/source/net/filebot/util/FileSet.java index 5aab14cc..0cf3e58c 100644 --- a/source/net/filebot/util/FileSet.java +++ b/source/net/filebot/util/FileSet.java @@ -44,6 +44,10 @@ public class FileSet extends AbstractSet { return add(getPath(e)); } + public void feed(Stream stream) { + stream.forEach(path -> add(path.toString())); + } + private boolean contains(Path e, int depth) { // add new leaf element if (e.getNameCount() - depth == 1) {