Search file in directory and its subdirectories

Can I search the file in the directory and its subdirectories (the directory is the VirtualFile object) by pattern, file name, or using the file filter?

If the search by filter is available then I could write the code for searching pictures like this:
VirtualFile[] getPictures(VirtualFile dir) {
return dir.getFiles(new FileFilter() {
boolean accept(File f) {
return isImageFile(f);

Please sign in to leave a comment.