!752 concepts. concept FileRef { S path; long touched; } static JTable table; p-substance { concepts(); update(); awtOnConceptChanges(table, "update", false); hideConsoleIfMainProgram(); dbBot(); } svoid update { bool first = table == null; L data = map(sortedByFieldDesc(list(FileRef), "touched"), func(FileRef f) { Map map = litorderedmap("Path" := f.path); pcall { File file = new File(f.path); S type; if (file.isFile()) { type = "File"; map.put("Size", file.length()); } else if (file.isDirectory()) type = "Directory"; else type = "Not found"; map.put("Type", type); } ret map; }); table = showTable(data, table); if (first) { addToWindow(table, jbutton("Add file or directory...", r { addFile(); })); tablePopupMenu(table, voidfunc(JPopupMenu menu, int row) { Map map = getTableLineAsMap(table, row); S path = (S) map.get("Path"); final File file = new File(path); if (file.isDirectory()) addMenuItem(menu, "Browse", r { browseDir(file) }); }); } } svoid addFile() { final new JTextField tf; showFormTitled("Add file or directory", "File/directory path", tf, r { S path = tf.getText().trim(); if (!isAbsolutePath(path)) { messageBox("Please enter an absolute path."); addFile(); ret; } cset(uniq(FileRef, +path), touched := now()); }); }