【发布时间】:2014-10-05 06:15:40
【问题描述】:
我研究全局模式。
我写了一个简单的例子:
PathMatcher matcher = FileSystems.getDefault().getPathMatcher("glob:D:\\folder1\\folder2\\**");
boolean isMatches = matcher.matches(Paths.get("D:\\folder1\\folder2\\folder3"));
System.out.println(isMatches);
此代码返回false。
如果我在模式中使用一颗星 - 我会看到相同的结果。
我做错了什么?
【问题讨论】: