FileSystem fs = getfs();
FileStatus[] status = fs.listStatus(new Path(dir));
ArrayList<FileObj> results = new ArrayList<FileObj>();
if (status != null) {
for (int i = 0; i < status.length; i++) {
results.add(new FileObj(status[i]));
}
}
return results;
}