code: public static void walkin(File dir, List<File> files) {
          String pattern = ".POS";
          File[] listFile = dir.listFiles();
          if (listFile != null) {
              for (File file : listFile) {                
                  if (file.isDirectory()) {
                      walkin(file, files);
                  } else {
                      if (file.getName().endsWith(pattern)) {
                          files.add(file);
                      }
                  }
              }
          }
      }
docs: Recursive function to descend into the directory tree and find all the files
  that end with ".POS"
  @param dir a file object defining the top directory