1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-25 01:08:52 -05:00

* experiment with data structures for keeping/checking file trees in memory

This commit is contained in:
Reinhard Pointner 2015-04-09 18:47:14 +00:00
parent 1ea92011a3
commit 0a7a3c36bf

View File

@ -44,6 +44,10 @@ public class FileSet extends AbstractSet<Path> {
return add(getPath(e)); return add(getPath(e));
} }
public void feed(Stream<? extends Object> stream) {
stream.forEach(path -> add(path.toString()));
}
private boolean contains(Path e, int depth) { private boolean contains(Path e, int depth) {
// add new leaf element // add new leaf element
if (e.getNameCount() - depth == 1) { if (e.getNameCount() - depth == 1) {