Path db = new Path(args[0]);
ArrayList segs = new ArrayList();
for (int i = 1; i < args.length; i++) {
if (args[i].equals("-dir")) {
segDir = new Path(args[++i]);
Path[] files = fs.listPaths(segDir, new PathFilter() {
public boolean accept(Path f) {
try {
if (fs.isDirectory(f)) return true;
} catch (IOException ioe) {};
return false;