In Java code, I want to connect to a directory in HDFS, learn the number of files in that directory, get their names and want to read them. I can already read the files but I co
FileSystem fs = FileSystem.get(conf); Path pt = new Path("/path"); ContentSummary cs = fs.getContentSummary(pt); long fileCount = cs.getFileCount();