@Test public void testGlobStarAtEnd() throws Exception { String dir = getTestdataDir(); File[] files = WildcardMatcher.glob(dir + "/foo/bar/*"); assertNotNull(files); for (File file : files) { } assertEquals(3, files.length); Arrays.sort(files); assertEquals(new File(dir, "foo/bar/test1.txt"), files[0]); assertEquals(new File(dir, "foo/bar/test2.dat"), files[1]); assertEquals(new File(dir, "foo/bar/test3.txt"), files[2]); }
public static File[] glob(String filePattern) throws IOException { Set<File> fileSet = new TreeSet<>(); glob(filePattern, fileSet); return fileSet.toArray(new File[fileSet.size()]); }
WildcardMatcher { public static File[] glob(String filePattern) throws IOException { Set<File> fileSet = new TreeSet<>(); glob(filePattern, fileSet); return fileSet.toArray(new File[fileSet.size()]); } }
WildcardMatcher { public static File[] glob(String filePattern) throws IOException { Set<File> fileSet = new TreeSet<>(); glob(filePattern, fileSet); return fileSet.toArray(new File[fileSet.size()]); } WildcardMatcher(String wildcard);   WildcardMatcher(String wildcard, boolean windowsFs); }
WildcardMatcher { public static File[] glob(String filePattern) throws IOException { Set<File> fileSet = new TreeSet<>(); glob(filePattern, fileSet); return fileSet.toArray(new File[fileSet.size()]); } WildcardMatcher(String wildcard);   WildcardMatcher(String wildcard, boolean windowsFs); static File[] glob(String filePattern); static void glob(String filePattern, Set<File> fileSet); boolean matches(String text); }
WildcardMatcher { public static File[] glob(String filePattern) throws IOException { Set<File> fileSet = new TreeSet<>(); glob(filePattern, fileSet); return fileSet.toArray(new File[fileSet.size()]); } WildcardMatcher(String wildcard);   WildcardMatcher(String wildcard, boolean windowsFs); static File[] glob(String filePattern); static void glob(String filePattern, Set<File> fileSet); boolean matches(String text);  }