List<String> flattenedPatterns = GlobExpander.expand(pathPatternString);
while (!toExpand.isEmpty()) { StringWithOffset path = toExpand.remove(0); List<StringWithOffset> expanded = expandLeftmost(path); if (expanded == null) { fullyExpanded.add(path.string);
int leftmost = leftmostOuterCurlyContainingSlash(filePattern, filePatternWithOffset.offset); if (leftmost == -1) {
private void checkExpansion(String filePattern, String... expectedExpansions) throws IOException { List<String> actualExpansions = GlobExpander.expand(filePattern); assertEquals("Different number of expansions", expectedExpansions.length, actualExpansions.size()); for (int i = 0; i < expectedExpansions.length; i++) { assertEquals("Expansion of " + filePattern, expectedExpansions[i], actualExpansions.get(i)); } } }
/** * Expand globs in the given <code>filePattern</code> into a collection of * file patterns so that in the expanded set no file pattern has a * slash character ("/") in a curly bracket pair. * @param filePattern * @return expanded file patterns * @throws IOException */ public static List<String> expand(String filePattern) throws IOException { List<String> fullyExpanded = new ArrayList<String>(); List<StringWithOffset> toExpand = new ArrayList<StringWithOffset>(); toExpand.add(new StringWithOffset(filePattern, 0)); while (!toExpand.isEmpty()) { StringWithOffset path = toExpand.remove(0); List<StringWithOffset> expanded = expandLeftmost(path); if (expanded == null) { fullyExpanded.add(path.string); } else { toExpand.addAll(0, expanded); } } return fullyExpanded; }
int leftmost = leftmostOuterCurlyContainingSlash(filePattern, filePatternWithOffset.offset); if (leftmost == -1) {
throws IOException { String filename = pathPattern.toUri().getPath(); List<String> filePatterns = GlobExpander.expand(filename); if (filePatterns.size() == 1) { return globStatusInternal(pathPattern, filter);
/** * Expand globs in the given <code>filePattern</code> into a collection of * file patterns so that in the expanded set no file pattern has a * slash character ("/") in a curly bracket pair. * @param filePattern * @return expanded file patterns * @throws IOException */ public static List<String> expand(String filePattern) throws IOException { List<String> fullyExpanded = new ArrayList<String>(); List<StringWithOffset> toExpand = new ArrayList<StringWithOffset>(); toExpand.add(new StringWithOffset(filePattern, 0)); while (!toExpand.isEmpty()) { StringWithOffset path = toExpand.remove(0); List<StringWithOffset> expanded = expandLeftmost(path); if (expanded == null) { fullyExpanded.add(path.string); } else { toExpand.addAll(0, expanded); } } return fullyExpanded; }
int leftmost = leftmostOuterCurlyContainingSlash(filePattern, filePatternWithOffset.offset); if (leftmost == -1) {
throws IOException { String filename = pathPattern.toUri().getPath(); List<String> filePatterns = GlobExpander.expand(filename); if (filePatterns.size() == 1) { return globStatusInternal(pathPattern, filter);
/** * Expand globs in the given <code>filePattern</code> into a collection of * file patterns so that in the expanded set no file pattern has a * slash character ("/") in a curly bracket pair. * @param filePattern * @return expanded file patterns * @throws IOException */ public static List<String> expand(String filePattern) throws IOException { List<String> fullyExpanded = new ArrayList<String>(); List<StringWithOffset> toExpand = new ArrayList<StringWithOffset>(); toExpand.add(new StringWithOffset(filePattern, 0)); while (!toExpand.isEmpty()) { StringWithOffset path = toExpand.remove(0); List<StringWithOffset> expanded = expandLeftmost(path); if (expanded == null) { fullyExpanded.add(path.string); } else { toExpand.addAll(0, expanded); } } return fullyExpanded; }
int leftmost = leftmostOuterCurlyContainingSlash(filePattern, filePatternWithOffset.offset); if (leftmost == -1) {
private void checkExpansion(String filePattern, String... expectedExpansions) throws IOException { List<String> actualExpansions = GlobExpander.expand(filePattern); assertEquals("Different number of expansions", expectedExpansions.length, actualExpansions.size()); for (int i = 0; i < expectedExpansions.length; i++) { assertEquals("Expansion of " + filePattern, expectedExpansions[i], actualExpansions.get(i)); } } }
/** * Expand globs in the given <code>filePattern</code> into a collection of * file patterns so that in the expanded set no file pattern has a * slash character ("/") in a curly bracket pair. * @param filePattern * @return expanded file patterns * @throws IOException */ public static List<String> expand(String filePattern) throws IOException { List<String> fullyExpanded = new ArrayList<String>(); List<StringWithOffset> toExpand = new ArrayList<StringWithOffset>(); toExpand.add(new StringWithOffset(filePattern, 0)); while (!toExpand.isEmpty()) { StringWithOffset path = toExpand.remove(0); List<StringWithOffset> expanded = expandLeftmost(path); if (expanded == null) { fullyExpanded.add(path.string); } else { toExpand.addAll(0, expanded); } } return fullyExpanded; }
int leftmost = leftmostOuterCurlyContainingSlash(filePattern, filePatternWithOffset.offset); if (leftmost == -1) {
private void checkExpansion(String filePattern, String... expectedExpansions) throws IOException { List<String> actualExpansions = GlobExpander.expand(filePattern); assertEquals("Different number of expansions", expectedExpansions.length, actualExpansions.size()); for (int i = 0; i < expectedExpansions.length; i++) { assertEquals("Expansion of " + filePattern, expectedExpansions[i], actualExpansions.get(i)); } } }
/** * Expand globs in the given <code>filePattern</code> into a collection of * file patterns so that in the expanded set no file pattern has a * slash character ("/") in a curly bracket pair. * @param filePattern * @return expanded file patterns * @throws IOException */ public static List<String> expand(String filePattern) throws IOException { List<String> fullyExpanded = new ArrayList<String>(); List<StringWithOffset> toExpand = new ArrayList<StringWithOffset>(); toExpand.add(new StringWithOffset(filePattern, 0)); while (!toExpand.isEmpty()) { StringWithOffset path = toExpand.remove(0); List<StringWithOffset> expanded = expandLeftmost(path); if (expanded == null) { fullyExpanded.add(path.string); } else { toExpand.addAll(0, expanded); } } return fullyExpanded; }
int leftmost = leftmostOuterCurlyContainingSlash(filePattern, filePatternWithOffset.offset); if (leftmost == -1) {
List<String> flattenedPatterns = GlobExpander.expand(pathPatternString);
/** * Expand globs in the given <code>filePattern</code> into a collection of * file patterns so that in the expanded set no file pattern has a * slash character ("/") in a curly bracket pair. * @param filePattern * @return expanded file patterns * @throws IOException */ public static List<String> expand(String filePattern) throws IOException { List<String> fullyExpanded = new ArrayList<String>(); List<StringWithOffset> toExpand = new ArrayList<StringWithOffset>(); toExpand.add(new StringWithOffset(filePattern, 0)); while (!toExpand.isEmpty()) { StringWithOffset path = toExpand.remove(0); List<StringWithOffset> expanded = expandLeftmost(path); if (expanded == null) { fullyExpanded.add(path.string); } else { toExpand.addAll(0, expanded); } } return fullyExpanded; }