public ArrayList<FileEntityDescription> loadFiles(String filter, String owner) throws SQLException {
        //implement
        //Note that if a file is marked as private, it can be listed only for its owner


        ArrayList<FileEntityDescription> toreturn = new ArrayList<>();
        ResultSet r = filesTable.selectAll();
        while (r.next()) {
            if (!filter.isEmpty() && !r.getString("name").contains(filter)) continue;
            if (r.getBoolean("privacy") && !r.getString("owner").equals(owner)) {
                continue;
            }
            Date d = r.getTimestamp("time");
            toreturn.add(new FileEntityDescription(r.getString("name"), r.getInt("size"),
                    r.getString("owner"), r.getBoolean("privacy"),
                    r.getBoolean("permission"), d));
        }
        return toreturn;
    }