A Java Glob implementation taken from OpenJDK 7 sun.nio.fs.Globs