From 2da9c4454aa3ad663a0ad83a692d2ca65ff0da10 Mon Sep 17 00:00:00 2001 From: Xueming Shen Date: Mon, 18 Apr 2011 21:44:03 -0700 Subject: [PATCH] 7027900: (fs) glob syntax under-specified Clarify how leading dots are treated in nio2 glob Reviewed-by: alanb --- jdk/src/share/classes/java/nio/file/FileSystem.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jdk/src/share/classes/java/nio/file/FileSystem.java b/jdk/src/share/classes/java/nio/file/FileSystem.java index 97dfc4649fc..9091f4aae6e 100644 --- a/jdk/src/share/classes/java/nio/file/FileSystem.java +++ b/jdk/src/share/classes/java/nio/file/FileSystem.java @@ -391,6 +391,13 @@ public abstract class FileSystem * 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}.