FileSystem.getPathMatcher(String syntaxAndPattern) has the following syntax.
public abstract PathMatcher getPathMatcher(String syntaxAndPattern)
In the following code shows how to use FileSystem.getPathMatcher(String syntaxAndPattern) method.
import java.io.IOException; import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.PathMatcher; /*from w w w.ja v a 2 s . com*/ public class Main { public static void main(String[] args) throws IOException { FileSystem fileSystem = FileSystems.getDefault(); PathMatcher matcher = fileSystem.getPathMatcher("glob:java?.exe"); } }