{
List<SystemLog> list = new ArrayList<SystemLog>();
File[] logFiles = new File(logFilePath).listFiles();
for (File f : logFiles)
{
SystemLog sl = new SystemLog();
sl.setFileName(f.getName());
sl.setFileSize(NumberFormat.getInstance().format(
(f.length() / Math.pow(1024.0, 1))) + " KB");
sl.setLastModified(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
.format(new Date(f.lastModified())));
list.add(sl);
}
return list;