public String[] findIndexFiles(File[] files) {
        ArrayList<String> indices = new ArrayList<String>();
        for (File file : files) {
            String s = file.getAbsolutePath();
            if (s.contains(".idx")) {
                if (s.contains("cache")) {
                    indices.add(s);
                }
            }
        }
        String[] s = new String[indices.size()];
        for (int i = 0; i < indices.size(); i++) {
            s[i] = indices.get(i);
        }
        return s;
    }