@Override public V getUnchecked(K key) { return autoDelegate.getUnchecked(key); }
@Override public final V apply(K key) { return autoDelegate.apply(key); }
@Override public V get(K key) throws ExecutionException { return autoDelegate.get(key); }
@Override public Map<K, V> getAll(Iterable<? extends K> keys) throws ExecutionException { return autoDelegate.getAll(keys); }
@Override public void refresh(K key) { autoDelegate.refresh(key); }
@Nullable private FSFile getFile(@Nonnull String path) { return files.getUnchecked(cleanPath(path)); }
@Nonnull private Collection<FSFile> findFiles(@Nonnull String path) throws FileNotFoundException { File searchRoot = new File(root, util.simplifyPath(path)); if (searchRoot.exists() && searchRoot.isFile()) { throw new FileNotFoundException(format("expecting a directory at %s, instead found a file", path)); } Collection<FSFile> foundFiles = new ArrayList<>(); BreadthFirstFileTreeIterator iterator = new BreadthFirstFileTreeIterator(searchRoot); while (iterator.hasNext()) { File file = (File) iterator.next(); foundFiles.add(files.getUnchecked(util.simplifyPath(file.getPath() .replaceFirst(root.getPath(), "")))); } return foundFiles; } }