private List<String> recurseOnFiles(FileSystem fs, FileStatus[] files, List<String> fileNames)
    throws IOException {
    if (files == null || files.length == 0) {
      return fileNames;
    }

    for (FileStatus file : files) {
      if (file.isDirectory()) {
        recurseOnFiles(fs, CommonFSUtils.listStatus(fs, file.getPath(), null), fileNames);
      } else {
        fileNames.add(file.getPath().getName());
      }
    }
    return fileNames;
  }
Recursively lookup all the file names under the file[] array *
hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java