Holder (VirtualFile file) { final Holder holder = new Holder(); VfsUtilCore.iterateChildrenRecursively(file, null, virtualFile -> { if (virtualFile.is(VFileProperty.SYMLINK) && !virtualFile.is(VFileProperty.HIDDEN)) { holder.setSymlink(); } if (!virtualFile.isDirectory()) { holder.increaseByOne(); } return true; }); return holder; }