code: private static List<File> getFiles(String inputPath, String parent) {
      List<File> res = new ArrayList<>();
      File pFile = new File(parent);
      if (!pFile.exists() || !pFile.isDirectory()) {
        return res;
      }
      if (pFile.isDirectory() && pFile.canRead()) {
        File[] fileList = pFile.listFiles();
        if (fileList == null) {
          return res;
        }
        for (File file : fileList) {
          if (match(file.getPath(), inputPath)) { // if it matches
            res.add(file);
          } else {
            if (file.isDirectory()) { // if it is a folder, we do it recursively
              AlluxioURI dirURI = new AlluxioURI(file.getPath());
              String prefix = new AlluxioURI(inputPath).getLeadingPath(dirURI.getDepth());
              if (prefix != null && match(dirURI, new AlluxioURI(prefix))) {
                res.addAll(getFiles(inputPath, dirURI.getPath()));
              }
            }
          }
        }
      }
      return res;
    }
docs: The utility function used to implement getFiles.
  
  It follows the same algorithm as {@link #getAlluxioURIs}.
  
  @param inputPath the input file path (could contain wildcards)
  @param parent the directory in which we are searching matched files
  @return a list of files that matches the input path in the parent directory