SearchByExt - ViiSE/papka GitHub Wiki
SearchByExt<T> - search by file extension.
public SearchByExt(Search<T, String> search)
Search<T, String> find - search by files.
List<String> rootFiles = new ArrayList<>();
rootFiles.add("root1.png");
rootFiles.add("root2.pdf");
rootFiles.add("root3.txt");
rootFiles.add("root4.pdf");
rootFiles.add("root5.txt");
Folder<String> root = new FolderPure<>(
new NameFolderRoot(),
rootFiles);
Search<List<String>, String> search = new SearchByExt<>(
new SearchFilesByRegex(root, false));
List<String> files = search.answer(".txt");
files.forEach(System.out::println);
Output:
root3.txt
root5.txt
Search - implementable interface.