package com.chenyang.nse.bussiness.tools.filesystem;

import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

public class FileSystemTool {
   public static FileStatus[] getFileByPath(String path) throws IOException {
      Configuration conf = new Configuration();
      FileSystem fs = FileSystem.get(conf);
      FileStatus[] files = fs.listStatus(new Path(path));
      return files;
   }
}
