private static void generalListStatusRecursively(FileSystem fs, FileStatus fileStatus, List<FileStatus> results) throws IOException {
    if (fileStatus.isDirectory()) {
      for (FileStatus stat : fs.listStatus(fileStatus.getPath(), HIDDEN_FILES_PATH_FILTER)) {
        generalListStatusRecursively(fs, stat, results);
      }
    } else {
      results.add(fileStatus);
    }
  }
Recursively lists status for all files starting from a particular directory (or individual file
as base case).

@param fs
         file system

@param fileStatus
         starting point in file system

@param results
         receives enumeration of all files found
common/src/java/org/apache/hadoop/hive/common/FileUtils.java