Skip to content
Advertisement

Tag: glob

Java PathMatcher not working properly on Windows

I try to implement a JUnit test for my SimpleFileVisitor but the used PathMatcher doesn’t work properly on Windows. The problem seems to be the PathMatcher with a regex pattern behaves different on Linux and Windows: But I’ve a longer list in my regex for multiple files which are not easy to migrate to glob syntax. Otherwise I’ve nested groups

When to use ** (double star) in glob syntax within JAVA

Directly from this Java Oracle tutorial: Two asterisks, **, works like * but crosses directory boundaries. This syntax is generally used for matching complete paths. Could anybody do a real example out of it? What do they mean with “crosses directory boundary”? Crossing the directory boundary, I imagine something like checking the file from root to getNameCount()-1. Again a real

Advertisement