# HG changeset patch # User sherman # Date 1303188243 25200 # Node ID f08c52fe9fc741aeeb35bbcbf6c16bf675d6e170 # Parent 97b05126e0c7142f91d55a786078bb1f7bdf0c62 7027900: (fs) glob syntax under-specified Summary: Clarify how leading dots are treated in nio2 glob Reviewed-by: alanb diff -r 97b05126e0c7 -r f08c52fe9fc7 jdk/src/share/classes/java/nio/file/FileSystem.java --- a/jdk/src/share/classes/java/nio/file/FileSystem.java Mon Apr 18 11:32:41 2011 -0700 +++ b/jdk/src/share/classes/java/nio/file/FileSystem.java Mon Apr 18 21:44:03 2011 -0700 @@ -391,6 +391,13 @@ * character is used to separate the subpatterns. Groups cannot be nested. *

* + *
  • Leading period/dot characters in file name are + * treated as regular characters in match operations. For example, + * the {@code "*"} glob pattern matches file name {@code ".login"}. + * The {@link Files#isHidden} method may be used to test whether a file + * is considered hidden. + *

  • + * *
  • All other characters match themselves in an implementation * dependent manner. This includes characters representing any {@link * FileSystem#getSeparator name-separators}.