max = 10;
}
}
it = dirlog.getLatestDirs(max);
while (it.hasNext()) {
DirlogEntry de = it.next();
connection.respond(de.getFiles() + ";" + de.getSize() + ";" + de.getTime() + ";" + escape(de.getPath()));
}
connection.respond("200 SITE NEW RAW");
} else {
connection.respond(createHeader());
connection.respond(String.format(lineFormat, Formatter.getBar(), "Files", "Size", "Age", "Directory", Formatter.getBar()));
connection.respond(Formatter.createLine(200));
if (parameterList.length > 1) {
try {
max = Integer.parseInt(parameterList[1]);
} catch (NumberFormatException e) {
max = 10;
}
}
it = dirlog.getLatestDirs(max);
while (it.hasNext()) {
DirlogEntry de = it.next();
connection.respond(String.format(lineFormat, Formatter.getBar(), de.getFiles(), Formatter.size(de.getSize()), Formatter.shortDuration((System.currentTimeMillis() - de.getTime()) / 1000), de.getPath(), Formatter.getBar()));
}
connection.respond(Formatter.createFooter(200));
}
}