import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.stream.Collectors;
String glob = "glob:" + parentDir.toString() + File.separator
+ rest;
PathMatcher pm = FileSystems.getDefault().getPathMatcher(glob);
- int maxDepth = rest.contains("**") ? Integer.MAX_VALUE
+ int maxDepth = rest.contains("**") ? 1028
: (int) (rest.chars()
.filter(ch -> ch == File.separatorChar).count())
+ 1;
+
Files.walkFileTree(parentDir,
EnumSet.of(FileVisitOption.FOLLOW_LINKS), maxDepth,
new SimpleFileVisitor<Path>()
files.add(f);
}
}
+ Collections.sort(files);
return files;
}
{
private static final String testfiles = "test/jalview/bin/argparser/testfiles";
- private static final String png1 = testfiles + "/dir1/test2.png";
+ private static final String png1 = testfiles + "/dir1/test1.png";
- private static final String png2 = testfiles + "/dir2/test2.png";
+ private static final String png2 = testfiles + "/dir2/test1.png";
@BeforeClass(alwaysRun = true)
public static void setUpBeforeClass() throws Exception