@Test public void testMatchDirs() throws Exception { for (String s : new String[]{"test/path/to/a/from/x", "test/path/to/b/from/y", "test/path/to/c/from/z", "test/path/to/c/from/zz"}) { new File(s).mkdirs(); } for (File f : LessFiles.matchFiles("test/path/to*/*/from")) { System.out.println("found3 -> " + f); } }
public static File[] matchFiles(String dirTemplate) { ArrayList<File> expanded = new ArrayList<>(); expandPath(dirTemplate, expanded); return expanded.toArray(new File[expanded.size()]); }
LessFiles { public static File[] matchFiles(String dirTemplate) { ArrayList<File> expanded = new ArrayList<>(); expandPath(dirTemplate, expanded); return expanded.toArray(new File[expanded.size()]); } }
LessFiles { public static File[] matchFiles(String dirTemplate) { ArrayList<File> expanded = new ArrayList<>(); expandPath(dirTemplate, expanded); return expanded.toArray(new File[expanded.size()]); } private  LessFiles(); }
LessFiles { public static File[] matchFiles(String dirTemplate) { ArrayList<File> expanded = new ArrayList<>(); expandPath(dirTemplate, expanded); return expanded.toArray(new File[expanded.size()]); } private  LessFiles(); static boolean deleteDir(File dir); static boolean flushDir(File dir); static void write(String path, byte[] data, boolean append); static void write(File out, byte[] data, boolean append); static byte[] read(File in); static File createTempDir(); static File createTempDir(String prefix, String suffix); static boolean isFileReadable(String filename); static BufferedReader getReader(String filepath); static BufferedReader getReader(File file); static BufferedReader getReader(InputStream is); static File initDirectory(String dir); static File initDirectory(File file); static File openDirectory(File file); static String setupUIDFile(File dir, String uidFileName); static void truncate(File file, long size); static void expandPath(String root, List<File> expanded); static File[] matchFiles(String dirTemplate); static String getSuffix(File file); static String getSuffix(String fname); static File replaceSuffix(File file, String new_suffix); static long directorySize(File directory); }
LessFiles { public static File[] matchFiles(String dirTemplate) { ArrayList<File> expanded = new ArrayList<>(); expandPath(dirTemplate, expanded); return expanded.toArray(new File[expanded.size()]); } private  LessFiles(); static boolean deleteDir(File dir); static boolean flushDir(File dir); static void write(String path, byte[] data, boolean append); static void write(File out, byte[] data, boolean append); static byte[] read(File in); static File createTempDir(); static File createTempDir(String prefix, String suffix); static boolean isFileReadable(String filename); static BufferedReader getReader(String filepath); static BufferedReader getReader(File file); static BufferedReader getReader(InputStream is); static File initDirectory(String dir); static File initDirectory(File file); static File openDirectory(File file); static String setupUIDFile(File dir, String uidFileName); static void truncate(File file, long size); static void expandPath(String root, List<File> expanded); static File[] matchFiles(String dirTemplate); static String getSuffix(File file); static String getSuffix(String fname); static File replaceSuffix(File file, String new_suffix); static long directorySize(File directory);  }