code: public static List<File> getFiles(String name, FileFilter filter, boolean includeSubtree) {
  
          List<File> ret = new ArrayList<File>();
  
          File file = new File(name);
          if (!file.isDirectory()) {
              file = new File(file.getParent());
              if (!file.isDirectory()) {
                  return ret;
              }
          }
          File[] dirContent = file.listFiles();
          for (int i = 0; i < dirContent.length; i++) {
              File f = dirContent[i];
              if (filter.accept(f)) {
                  ret.add(f);
              }
              if (includeSubtree && f.isDirectory()) {
                  ret.addAll(getFiles(f.getAbsolutePath(), filter, true));
              }
          }
  
          return ret;
      }
docs: Returns a list of all filtered files in the RFS.<p>
  
  If the <code>name</code> is not a folder the folder that contains the
  given file will be used instead.<p>
  
  Despite the filter may not accept folders, every subfolder is traversed
  if the <code>includeSubtree</code> parameter is set.<p>
  
  @param name a folder or file name
  @param filter a filter
  @param includeSubtree if to include subfolders
  
  @return a list of filtered <code>{@link File}</code> objects